﻿<!--TwilightBlue
// (c) Copyright Microsoft Corporation.
// This source is subject to Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:r="clr-namespace:Ricciolo.Controls;assembly=OpenExpressApp.Module.WPF"
    xmlns:s="clr-namespace:System;assembly=mscorlib"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008">

    <LinearGradientBrush x:Key="WindowBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF4785B0" Offset="0"/>
        <GradientStop Color="#FF63AADA" Offset="1"/>
    </LinearGradientBrush>

    <Color x:Key="PrimaryColor">#FF63AADA</Color>
    <Color x:Key="SecondaryColor">#FFA0FCFF</Color>
    <SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource PrimaryColor}" />
    <SolidColorBrush x:Key="SecondaryBrush" Color="{StaticResource SecondaryColor}" />
    <SolidColorBrush x:Key="TextBrush" Color="#FF152937" />
    <Color x:Key="DisabledColor">#8CFFFFFF</Color>

    <!-- Button -->
    <Style TargetType="Button">
        <Setter Property="Foreground" Value="{StaticResource TextBrush}" />
        <Setter Property="Background" Value="#00000000" />
        <Setter Property="Padding" Value="5,4" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{StaticResource PrimaryBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid x:Name="Button_Normal" SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused"/>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#BF000000"/>
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.3000000"/>
                                    <VisualTransition From="MouseOver" GeneratedDuration="00:00:00" To="Pressed"/>
                                    <VisualTransition From="MouseOver" GeneratedDuration="00:00:00.1000000" To="Normal"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Shadow" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#49000000"/>
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.08"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FF000000"/>
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.6"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FFECECEC"/>
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FFECECEC"/>
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.2"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="50*" />
                            <RowDefinition Height="50*" />
                        </Grid.RowDefinitions>
                        <Border CornerRadius="4" Grid.RowSpan="2" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#FFFFFFFF" Offset="0" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="4" x:Name="Background" Grid.RowSpan="2" Opacity="0.65">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                    <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                    <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Background="{TemplateBinding Background}" SnapsToDevicePixels="True" BorderBrush="#ccFFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder" Margin="2" Grid.RowSpan="2" />
                        <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
                            <Border.OpacityMask>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <TranslateTransform X="0" Y="-0.5" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.OpacityMask>
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                            <TranslateTransform Y="0.65" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00000000" Offset="0.55" />
                                    <GradientStop Color="#33000000" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Margin="1,1,1,0" CornerRadius="4,4,40,40" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                            <TranslateTransform Y="-0.6" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#BFFFFFFF" Offset="0" />
                                    <GradientStop Color="#4CFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" RenderTransformOrigin="0.5,0.5" Grid.RowSpan="2" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Background" TargetName="White">
                                <Setter.Value>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35"/>
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#FFECECEC" Offset="0"/>
                                        <GradientStop Color="#FFECECEC" Offset="1"/>
                                    </RadialGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Opacity" TargetName="Background" Value="0.2"/>
                            <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Toggle Button -->
    <Style TargetType="ToggleButton">
        <Setter Property="Background" Value="#001F3B53" />
        <Setter Property="Foreground" Value="{StaticResource TextBrush}" />
        <Setter Property="Padding" Value="5,4,5,4" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{StaticResource PrimaryBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Grid SnapsToDevicePixels="True">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="0.514*" />
                            <RowDefinition Height="0.486*" />
                        </Grid.RowDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.3000000" />
                                    <VisualTransition From="MouseOver" GeneratedDuration="00:00:00" To="Pressed" />
                                    <VisualTransition From="MouseOver" GeneratedDuration="00:00:00.1000000" To="Normal" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Shadow" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#4B000000" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value=".1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#4AFFFFFF" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.6" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FF000000" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FFC8C8C8" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#4BFFFFFF" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.2" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FFB1B1B1" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FFECECEC" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FFECECEC" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Unchecked" />
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#BF000000" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border CornerRadius="4" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1" Grid.RowSpan="2">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#FFFFFFFF" Offset="0" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" CornerRadius="4" x:Name="Background" Opacity="0.65" Grid.RowSpan="2">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                    <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                    <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Background="{TemplateBinding Background}" BorderBrush="#ccFFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder" Margin="2" Grid.RowSpan="2" />
                        <Border CornerRadius="3.5" x:Name="Shadow" Margin="2,2,2,2" Grid.RowSpan="2">
                            <Border.OpacityMask>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <TranslateTransform X="0" Y="-0.5" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.OpacityMask>
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                            <TranslateTransform Y="0.65" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00000000" Offset="0.55" />
                                    <GradientStop Color="#33000000" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Margin="1,1,1,0" CornerRadius="4,4,40,40" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                            <TranslateTransform Y="-0.6" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#BFFFFFFF" Offset="0" />
                                    <GradientStop Color="#4CFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <ContentPresenter x:Name="contentPresenter" RenderTransformOrigin="0.5,0.5" Margin="{TemplateBinding Padding}" Grid.RowSpan="2" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
                        <Grid Grid.RowSpan="2" Margin="2,2,2,2" Visibility="Hidden" x:Name="grid" Opacity="0.35">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="0.161*" />
                                <RowDefinition Height="0.839*" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="0.039*" />
                                <ColumnDefinition Width="0.961*" />
                            </Grid.ColumnDefinitions>
                            <Border Grid.ColumnSpan="2" Grid.RowSpan="1" Grid.Column="1" CornerRadius="0,3,0,0">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FF000000" Offset="0" />
                                        <GradientStop Color="#004392C7" Offset="1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Grid.ColumnSpan="1" Grid.RowSpan="2" Grid.Row="1" CornerRadius="0,0,0,3">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="1.1,0.5" StartPoint="0,0.5">
                                        <GradientStop Color="#FF000000" />
                                        <GradientStop Color="#004392C7" Offset="1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Grid.ColumnSpan="1" Grid.RowSpan="1" CornerRadius="3,0,0,0">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.988" ScaleY="1.988" />
                                                <TranslateTransform X="0.494" Y="0.494" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#004392C7" />
                                        <GradientStop Color="#FF000000" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Background" TargetName="White">
                                <Setter.Value>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35"/>
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#FFECECEC" Offset="0"/>
                                        <GradientStop Color="#FFECECEC" Offset="1"/>
                                    </RadialGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Opacity" TargetName="Background" Value="0.2"/>
                            <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--CheckBox-->
    <Style TargetType="{x:Type CheckBox}">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="Background" Value="#00FFFFFF" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="Content" Value="CheckBox" />
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="Padding" Value="4,1,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type CheckBox}">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.107" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Shadow" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#49000000" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Bullet" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Border" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FF080808" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.6" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Bullet" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Border" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FFECECEC" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Border" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FFECECEC" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.2" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Bullet" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.55" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Bullet" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked" />
                                <VisualState x:Name="Indeterminate">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="IndeterminateRectangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FF000000" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="16" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid Height="16" HorizontalAlignment="Stretch" VerticalAlignment="Top" Width="16" x:Name="grid">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="0.508*" />
                                <RowDefinition Height="0.492*" />
                            </Grid.RowDefinitions>
                            <Border x:Name="Border" Grid.RowSpan="2" BorderBrush="#FFB5B5B5" BorderThickness="1.2,1.2,1.2,1.2">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.414" ScaleY="1.414" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#FFFFFFFF" Offset="0" />
                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" x:Name="Background" Opacity=".5" Grid.RowSpan="2">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                        <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                        <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Background="{TemplateBinding Background}" BorderBrush="#FFFFFFFF" BorderThickness=".75" x:Name="InnerBorder" Margin="1" Visibility="Visible" Grid.RowSpan="2" />
                            <Border x:Name="Shadow" Margin="3" Grid.RowSpan="2">
                                <Border.OpacityMask>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <TranslateTransform X="0" Y="-0.5" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.OpacityMask>
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                <TranslateTransform Y="0.65" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00000000" Offset="0.55" />
                                        <GradientStop Color="#33000000" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Margin="1,1,1,0" CornerRadius="0,0,7,7" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                <TranslateTransform Y="-0.6" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#BFFFFFFF" Offset="0" />
                                        <GradientStop Color="#4CFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Grid Opacity="0.8" Visibility="Collapsed" x:Name="Bullet" Margin="-0.25,-0.25,0,0" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.RowSpan="2" >
                                <Path Fill="{TemplateBinding Foreground}" Data="M1.6045539,4.9657478 L3.9166667,6.7270508 L8.7999792,0.13644244 L10.335848,1.2280303 L4.1581869,9.0391064 L0.39386681,6.6038928 z" Margin="1,-1,-1,0" Stretch="Fill" StrokeLineJoin="Miter" StrokeMiterLimit="10" VerticalAlignment="Stretch" />
                            </Grid>
                            <Rectangle Stroke="{x:Null}" StrokeThickness="0" x:Name="IndeterminateRectangle" Fill="{DynamicResource TextBrush}" Visibility="Collapsed" Height="3" Margin="4,0,4,0" RadiusX="1" RadiusY="1"  Grid.RowSpan="2" />
                        </Grid>
                        <!--<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" Margin="{TemplateBinding Padding}" x:Name="contentPresenter" Grid.Column="1" />-->
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" TargetName="grid" Value="0.5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--RadioButton-->
    <Style TargetType="{x:Type RadioButton}">
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Setter Property="Background" Value="#00F4F4F4" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="4,1,0,0" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RadioButton}">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.112" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Shadow" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#49000000" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Bullet" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FF000000" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.6" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Bullet" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Bullet" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.55" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.2" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FFECECEC" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FFECECEC" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Bullet" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Bullet" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#BF000000" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="16" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid HorizontalAlignment="Stretch" VerticalAlignment="Top" Height="16" Width="16" x:Name="grid">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="0.512*" />
                                <RowDefinition Height="0.488*" />
                            </Grid.RowDefinitions>
                            <Border CornerRadius="8" x:Name="White" BorderBrush="#FFB5B5B5" BorderThickness="1.2" Grid.RowSpan="2">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#FFFFFFFF" Offset="0" />
                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" CornerRadius="8" x:Name="Background" Opacity=".5" Grid.RowSpan="2">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                        <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                        <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Background="{TemplateBinding Background}" BorderBrush="#FFFFFFFF" BorderThickness=".75" CornerRadius="7" x:Name="InnerBorder" Margin="1,1,1,1" Grid.RowSpan="2" />
                            <Border CornerRadius="5" x:Name="Shadow" Margin="3,3,3,3" Grid.RowSpan="2">
                                <Border.OpacityMask>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <TranslateTransform X="0" Y="-0.5" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.OpacityMask>
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                <TranslateTransform Y="0.65" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00000000" Offset="0.55" />
                                        <GradientStop Color="#33000000" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Margin="3,1,3,0" CornerRadius="6" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1" Grid.RowSpan="1">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                <TranslateTransform Y="-0.6" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#BFFFFFFF" Offset="0" />
                                        <GradientStop Color="#4CFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Grid Opacity="0.8" Visibility="Collapsed" x:Name="Bullet" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="6" Grid.RowSpan="2" Width="6">
                                <Ellipse Fill="{TemplateBinding Foreground}" />
                            </Grid>
                        </Grid>
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" Grid.Column="1" Margin="{TemplateBinding Padding}" IsEnabled="False" Content="{TemplateBinding Content}" x:Name="contentPresenter" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" TargetName="grid" Value="0.5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Expander-->
    <Style TargetType="{x:Type Expander}">
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Setter Property="Background" Value="{x:Null}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="BorderBrush" Value="{x:Null}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Expander}">
                    <ControlTemplate.Resources>
                        <ControlTemplate TargetType="{x:Type ToggleButton}" x:Key="ExpanderRightHeaderTemplate">
                            <Border Padding="{TemplateBinding Padding}">
                                <Grid SnapsToDevicePixels="False" Background="Transparent">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="19" />
                                        <RowDefinition Height="*" />
                                    </Grid.RowDefinitions>
                                    <Grid>
                                        <Grid.LayoutTransform>
                                            <TransformGroup>
                                                <TransformGroup.Children>
                                                    <TransformCollection>
                                                        <RotateTransform Angle="-90" />
                                                    </TransformCollection>
                                                </TransformGroup.Children>
                                            </TransformGroup>
                                        </Grid.LayoutTransform>
                                        <Grid HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="19" Height="19">
                                            <Grid.LayoutTransform>
                                                <TransformGroup>
                                                    <RotateTransform Angle="90" />
                                                </TransformGroup>
                                            </Grid.LayoutTransform>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="50*" />
                                                <RowDefinition Height="50*" />
                                            </Grid.RowDefinitions>
                                            <Border CornerRadius="4" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1.2" Grid.RowSpan="2">
                                                <Border.Background>
                                                    <RadialGradientBrush>
                                                        <RadialGradientBrush.RelativeTransform>
                                                            <TransformGroup>
                                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                                            </TransformGroup>
                                                        </RadialGradientBrush.RelativeTransform>
                                                        <GradientStop Color="#FFFFFFFF" Offset="0" />
                                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                                    </RadialGradientBrush>
                                                </Border.Background>
                                            </Border>
                                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" CornerRadius="4" x:Name="Background" Opacity="0.65" Grid.RowSpan="2">
                                                <Border.Background>
                                                    <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                                        <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                                        <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                                    </LinearGradientBrush>
                                                </Border.Background>
                                            </Border>
                                            <Border BorderBrush="#7FFFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder" Margin="1" Grid.RowSpan="2" />
                                            <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
                                                <Border.OpacityMask>
                                                    <RadialGradientBrush>
                                                        <RadialGradientBrush.RelativeTransform>
                                                            <TransformGroup>
                                                                <TranslateTransform X="0" Y="-0.5" />
                                                            </TransformGroup>
                                                        </RadialGradientBrush.RelativeTransform>
                                                        <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                                    </RadialGradientBrush>
                                                </Border.OpacityMask>
                                                <Border.Background>
                                                    <RadialGradientBrush>
                                                        <RadialGradientBrush.RelativeTransform>
                                                            <TransformGroup>
                                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                                <TranslateTransform Y="0.65" />
                                                            </TransformGroup>
                                                        </RadialGradientBrush.RelativeTransform>
                                                        <GradientStop Color="#00000000" Offset="0.55" />
                                                        <GradientStop Color="#33000000" Offset="1" />
                                                    </RadialGradientBrush>
                                                </Border.Background>
                                            </Border>
                                            <Border Margin="1" CornerRadius="4,4,40,40" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                                                <Border.Background>
                                                    <RadialGradientBrush>
                                                        <RadialGradientBrush.RelativeTransform>
                                                            <TransformGroup>
                                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                                <TranslateTransform Y="-0.6" />
                                                            </TransformGroup>
                                                        </RadialGradientBrush.RelativeTransform>
                                                        <GradientStop Color="#BFFFFFFF" Offset="0" />
                                                        <GradientStop Color="#4CFFFFFF" Offset="1" />
                                                    </RadialGradientBrush>
                                                </Border.Background>
                                            </Border>
                                        </Grid>
                                        <Path Stroke="{DynamicResource TextBrush}" StrokeThickness="2" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5" RenderTransformOrigin="0.5,0.5">
                                            <Path.RenderTransform>
                                                <TransformGroup>
                                                    <ScaleTransform ScaleX="1" ScaleY="-1"/>
                                                </TransformGroup>
                                            </Path.RenderTransform>
                                        </Path>
                                    </Grid>
                                    <ContentPresenter HorizontalAlignment="Center" Margin="0,4,0,0" VerticalAlignment="Top" SnapsToDevicePixels="True" Grid.Row="1" RecognizesAccessKey="True" />
                                </Grid>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsChecked" Value="True">
                                    <Setter Property="RenderTransformOrigin" TargetName="arrow" Value="0.5,0.5" />
                                    <Setter Property="RenderTransform" TargetName="arrow">
                                        <Setter.Value>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                                            </TransformGroup>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Background" TargetName="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.138" />
                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Opacity" TargetName="Background" Value="1" />
                                    <Setter Property="Background" TargetName="Shadow">
                                        <Setter.Value>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                        <TranslateTransform Y="0.65" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#00000000" Offset="0.55" />
                                                <GradientStop Color="#33000000" Offset="1" />
                                            </RadialGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Opacity" TargetName="Highlight" Value="0.5" />
                                    <Setter Property="BorderBrush" TargetName="InnerBorder" Value="#7F000000" />
                                    <Setter Property="Background" TargetName="White">
                                        <Setter.Value>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#FF2B2B2B" Offset="0" />
                                                <GradientStop Color="#FFFFFFFF" Offset="1" />
                                            </RadialGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Background" TargetName="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.089" />
                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Opacity" TargetName="Background" Value="1" />
                                    <Setter Property="Background" TargetName="Shadow">
                                        <Setter.Value>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                        <TranslateTransform Y="0.65" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#00000000" Offset="0.55" />
                                                <GradientStop Color="#4C000000" Offset="1" />
                                            </RadialGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Opacity" TargetName="Highlight" Value="1" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                        <ControlTemplate x:Key="ExpanderUpHeaderTemplate" TargetType="{x:Type ToggleButton}">
                            <Border Padding="{TemplateBinding Padding}">
                                <Grid SnapsToDevicePixels="False" Background="Transparent">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="19" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="19" Height="19">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="50*" />
                                            <RowDefinition Height="50*" />
                                        </Grid.RowDefinitions>
                                        <Border CornerRadius="4" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1.2" Grid.RowSpan="2">
                                            <Border.Background>
                                                <RadialGradientBrush>
                                                    <RadialGradientBrush.RelativeTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                                        </TransformGroup>
                                                    </RadialGradientBrush.RelativeTransform>
                                                    <GradientStop Color="#FFFFFFFF" Offset="0" />
                                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                                </RadialGradientBrush>
                                            </Border.Background>
                                        </Border>
                                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" CornerRadius="4" x:Name="Background" Opacity="0.65" Grid.RowSpan="2">
                                            <Border.Background>
                                                <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                                    <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                                    <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                                </LinearGradientBrush>
                                            </Border.Background>
                                        </Border>
                                        <Border BorderBrush="#7FFFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder" Margin="1" Grid.RowSpan="2" />
                                        <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
                                            <Border.OpacityMask>
                                                <RadialGradientBrush>
                                                    <RadialGradientBrush.RelativeTransform>
                                                        <TransformGroup>
                                                            <TranslateTransform X="0" Y="-0.5" />
                                                        </TransformGroup>
                                                    </RadialGradientBrush.RelativeTransform>
                                                    <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                                </RadialGradientBrush>
                                            </Border.OpacityMask>
                                            <Border.Background>
                                                <RadialGradientBrush>
                                                    <RadialGradientBrush.RelativeTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                            <TranslateTransform Y="0.65" />
                                                        </TransformGroup>
                                                    </RadialGradientBrush.RelativeTransform>
                                                    <GradientStop Color="#00000000" Offset="0.55" />
                                                    <GradientStop Color="#33000000" Offset="1" />
                                                </RadialGradientBrush>
                                            </Border.Background>
                                        </Border>
                                        <Border Margin="1" CornerRadius="4,4,40,40" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                                            <Border.Background>
                                                <RadialGradientBrush>
                                                    <RadialGradientBrush.RelativeTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                            <TranslateTransform Y="-0.6" />
                                                        </TransformGroup>
                                                    </RadialGradientBrush.RelativeTransform>
                                                    <GradientStop Color="#BFFFFFFF" Offset="0" />
                                                    <GradientStop Color="#4CFFFFFF" Offset="1" />
                                                </RadialGradientBrush>
                                            </Border.Background>
                                        </Border>
                                        <Path Stroke="{DynamicResource TextBrush}" StrokeThickness="2" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5">
                                            <Path.RenderTransform>
                                                <TransformGroup>
                                                    <ScaleTransform ScaleX="1" ScaleY="1"/>
                                                </TransformGroup>
                                            </Path.RenderTransform>
                                        </Path>
                                    </Grid>
                                    <ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Center" SnapsToDevicePixels="True" Grid.Column="1" RecognizesAccessKey="True" />
                                </Grid>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsChecked" Value="True">
                                    <Setter Property="RenderTransform" TargetName="arrow">
                                        <Setter.Value>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1" ScaleY="-1"/>
                                            </TransformGroup>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Opacity" TargetName="Highlight" Value="0.5" />
                                    <Setter Property="BorderBrush" TargetName="InnerBorder" Value="#7F2F2F2F" />
                                    <Setter Property="Background" TargetName="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0" />
                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Opacity" TargetName="Background" Value="1" />
                                    <Setter Property="Background" TargetName="White">
                                        <Setter.Value>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#FF000000" Offset="0" />
                                                <GradientStop Color="#FFFFFFFF" Offset="1" />
                                            </RadialGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Background" TargetName="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.129" />
                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Opacity" TargetName="Background" Value="1" />
                                    <Setter Property="Background" TargetName="Shadow">
                                        <Setter.Value>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                        <TranslateTransform Y="0.65" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#00000000" Offset="0.55" />
                                                <GradientStop Color="#4C000000" Offset="1" />
                                            </RadialGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Opacity" TargetName="Highlight" Value="1" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                        <ControlTemplate TargetType="{x:Type ToggleButton}" x:Key="ExpanderLeftHeaderTemplate">
                            <Border Padding="{TemplateBinding Padding}">
                                <Grid SnapsToDevicePixels="False" Background="Transparent">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="19" />
                                        <RowDefinition Height="*" />
                                    </Grid.RowDefinitions>
                                    <Grid>
                                        <Grid.LayoutTransform>
                                            <TransformGroup>
                                                <TransformGroup.Children>
                                                    <TransformCollection>
                                                        <RotateTransform Angle="90" />
                                                    </TransformCollection>
                                                </TransformGroup.Children>
                                            </TransformGroup>
                                        </Grid.LayoutTransform>
                                        <Grid Width="19" Height="19">
                                            <Grid.LayoutTransform>
                                                <TransformGroup>
                                                    <RotateTransform Angle="-90" />
                                                </TransformGroup>
                                            </Grid.LayoutTransform>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="50*" />
                                                <RowDefinition Height="50*" />
                                            </Grid.RowDefinitions>
                                            <Border CornerRadius="4" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1.2" Grid.RowSpan="2">
                                                <Border.Background>
                                                    <RadialGradientBrush>
                                                        <RadialGradientBrush.RelativeTransform>
                                                            <TransformGroup>
                                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                                            </TransformGroup>
                                                        </RadialGradientBrush.RelativeTransform>
                                                        <GradientStop Color="#FFFFFFFF" Offset="0" />
                                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                                    </RadialGradientBrush>
                                                </Border.Background>
                                            </Border>
                                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" CornerRadius="4" x:Name="Background" Opacity="0.65" Grid.RowSpan="2">
                                                <Border.Background>
                                                    <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                                        <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                                        <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                                    </LinearGradientBrush>
                                                </Border.Background>
                                            </Border>
                                            <Border BorderBrush="#7FFFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder" Margin="1" Grid.RowSpan="2" />
                                            <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
                                                <Border.OpacityMask>
                                                    <RadialGradientBrush>
                                                        <RadialGradientBrush.RelativeTransform>
                                                            <TransformGroup>
                                                                <TranslateTransform X="0" Y="-0.5" />
                                                            </TransformGroup>
                                                        </RadialGradientBrush.RelativeTransform>
                                                        <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                                    </RadialGradientBrush>
                                                </Border.OpacityMask>
                                                <Border.Background>
                                                    <RadialGradientBrush>
                                                        <RadialGradientBrush.RelativeTransform>
                                                            <TransformGroup>
                                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                                <TranslateTransform Y="0.65" />
                                                            </TransformGroup>
                                                        </RadialGradientBrush.RelativeTransform>
                                                        <GradientStop Color="#00000000" Offset="0.55" />
                                                        <GradientStop Color="#33000000" Offset="1" />
                                                    </RadialGradientBrush>
                                                </Border.Background>
                                            </Border>
                                            <Border Margin="1" CornerRadius="4,4,40,40" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                                                <Border.Background>
                                                    <RadialGradientBrush>
                                                        <RadialGradientBrush.RelativeTransform>
                                                            <TransformGroup>
                                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                                <TranslateTransform Y="-0.6" />
                                                            </TransformGroup>
                                                        </RadialGradientBrush.RelativeTransform>
                                                        <GradientStop Color="#BFFFFFFF" Offset="0" />
                                                        <GradientStop Color="#4CFFFFFF" Offset="1" />
                                                    </RadialGradientBrush>
                                                </Border.Background>
                                            </Border>
                                            <Path Stroke="{DynamicResource TextBrush}" StrokeThickness="2" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5"  RenderTransformOrigin="0.5,0.5" Grid.RowSpan="2">
                                                <Path.RenderTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform ScaleX="-1" ScaleY="1"/>
                                                        <RotateTransform Angle="-90"/>
                                                    </TransformGroup>
                                                </Path.RenderTransform>
                                            </Path>
                                        </Grid>
                                    </Grid>
                                    <ContentPresenter HorizontalAlignment="Center" Margin="0,4,0,0" VerticalAlignment="Top" SnapsToDevicePixels="True" Grid.Row="1" RecognizesAccessKey="True" />
                                </Grid>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsChecked" Value="true">
                                    <Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5" />
                                </Trigger>
                                <Trigger Property="IsMouseOver" Value="true">
                                    <Setter Property="Background" TargetName="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.089" />
                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Opacity" TargetName="Background" Value="1" />
                                    <Setter Property="Background" TargetName="Shadow">
                                        <Setter.Value>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                        <TranslateTransform Y="0.65" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#00000000" Offset="0.55" />
                                                <GradientStop Color="#4C000000" Offset="1" />
                                            </RadialGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Opacity" TargetName="Highlight" Value="1" />
                                </Trigger>
                                <Trigger Property="IsPressed" Value="true">
                                    <Setter Property="Stroke" TargetName="arrow" Value="#FF003366" />
                                    <Setter Property="Opacity" TargetName="Highlight" Value="0.5" />
                                    <Setter Property="BorderBrush" TargetName="InnerBorder" Value="#7F202020" />
                                    <Setter Property="Background" TargetName="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0" />
                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Opacity" TargetName="Background" Value="1" />
                                    <Setter Property="Background" TargetName="White">
                                        <Setter.Value>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#FF0C0C0C" Offset="0" />
                                                <GradientStop Color="#FFFFFFFF" Offset="1" />
                                            </RadialGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                        <ControlTemplate TargetType="{x:Type ToggleButton}" x:Key="ExpanderDownHeaderTemplate">
                            <Border Padding="{TemplateBinding Padding}">
                                <Grid SnapsToDevicePixels="False" Background="Transparent">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="19" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="19" Height="19">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="50*" />
                                            <RowDefinition Height="50*" />
                                        </Grid.RowDefinitions>
                                        <Border CornerRadius="4" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1.2" Grid.RowSpan="2">
                                            <Border.Background>
                                                <RadialGradientBrush>
                                                    <RadialGradientBrush.RelativeTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                                        </TransformGroup>
                                                    </RadialGradientBrush.RelativeTransform>
                                                    <GradientStop Color="#FFFFFFFF" Offset="0" />
                                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                                </RadialGradientBrush>
                                            </Border.Background>
                                        </Border>
                                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" CornerRadius="4" x:Name="Background" Opacity="0.65" Grid.RowSpan="2">
                                            <Border.Background>
                                                <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                                    <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                                    <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                                </LinearGradientBrush>
                                            </Border.Background>
                                        </Border>
                                        <Border BorderBrush="#7FFFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder" Margin="1" Grid.RowSpan="2" />
                                        <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
                                            <Border.OpacityMask>
                                                <RadialGradientBrush>
                                                    <RadialGradientBrush.RelativeTransform>
                                                        <TransformGroup>
                                                            <TranslateTransform X="0" Y="-0.5" />
                                                        </TransformGroup>
                                                    </RadialGradientBrush.RelativeTransform>
                                                    <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                                </RadialGradientBrush>
                                            </Border.OpacityMask>
                                            <Border.Background>
                                                <RadialGradientBrush>
                                                    <RadialGradientBrush.RelativeTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                            <TranslateTransform Y="0.65" />
                                                        </TransformGroup>
                                                    </RadialGradientBrush.RelativeTransform>
                                                    <GradientStop Color="#00000000" Offset="0.55" />
                                                    <GradientStop Color="#33000000" Offset="1" />
                                                </RadialGradientBrush>
                                            </Border.Background>
                                        </Border>
                                        <Border Margin="1" CornerRadius="4,4,40,40" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                                            <Border.Background>
                                                <RadialGradientBrush>
                                                    <RadialGradientBrush.RelativeTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                            <TranslateTransform Y="-0.6" />
                                                        </TransformGroup>
                                                    </RadialGradientBrush.RelativeTransform>
                                                    <GradientStop Color="#BFFFFFFF" Offset="0" />
                                                    <GradientStop Color="#4CFFFFFF" Offset="1" />
                                                </RadialGradientBrush>
                                            </Border.Background>
                                        </Border>
                                        <Path Stroke="{DynamicResource TextBrush}" StrokeThickness="2" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5"  Grid.RowSpan="23" RenderTransformOrigin="0.5,0.5">
                                            <Path.RenderTransform>
                                                <TransformGroup>
                                                    <ScaleTransform ScaleX="1" ScaleY="-1"/>
                                                </TransformGroup>
                                            </Path.RenderTransform>
                                        </Path>
                                    </Grid>
                                    <ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Center" SnapsToDevicePixels="True" Grid.Column="1" RecognizesAccessKey="True" />
                                </Grid>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsChecked" Value="True">
                                    <Setter Property="RenderTransformOrigin" TargetName="arrow" Value="0.5,0.5" />
                                    <Setter Property="RenderTransform" TargetName="arrow">
                                        <Setter.Value>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                                            </TransformGroup>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Background" TargetName="White">
                                        <Setter.Value>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#FF141414" Offset="0" />
                                                <GradientStop Color="#FFFFFFFF" Offset="1" />
                                            </RadialGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Background" TargetName="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0" />
                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Opacity" TargetName="Background" Value="1" />
                                    <Setter Property="BorderBrush" TargetName="InnerBorder" Value="#7F686868" />
                                    <Setter Property="Opacity" TargetName="Highlight" Value="0.5" />
                                </Trigger>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Background" TargetName="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.143" />
                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Opacity" TargetName="Background" Value="1" />
                                    <Setter Property="Background" TargetName="Shadow">
                                        <Setter.Value>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                        <TranslateTransform Y="0.65" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#00000000" Offset="0.55" />
                                                <GradientStop Color="#4C000000" Offset="1" />
                                            </RadialGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Opacity" TargetName="Highlight" Value="1" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </ControlTemplate.Resources>
                    <Border SnapsToDevicePixels="true" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" x:Name="border" Background="#00A7A6A6">
                        <DockPanel>
                            <ToggleButton Margin="1" MinHeight="0" MinWidth="0" x:Name="HeaderSite" Template="{StaticResource ExpanderDownHeaderTemplate}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" DockPanel.Dock="Top" Background="#FF000000" BorderBrush="{DynamicResource PrimaryBrush}" Opacity="1" />
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="ExpandSite" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="false" Visibility="Collapsed" />
                        </DockPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded" Value="true">
                            <Setter Property="Visibility" TargetName="ExpandSite" Value="Visible" />
                        </Trigger>
                        <Trigger Property="ExpandDirection" Value="Right">
                            <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Right" />
                            <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Left" />
                            <Setter Property="Template" TargetName="HeaderSite" Value="{StaticResource ExpanderRightHeaderTemplate}" />
                        </Trigger>
                        <Trigger Property="ExpandDirection" Value="Up">
                            <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Top" />
                            <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Bottom" />
                            <Setter Property="Template" TargetName="HeaderSite" Value="{StaticResource ExpanderUpHeaderTemplate}" />
                        </Trigger>
                        <Trigger Property="ExpandDirection" Value="Left">
                            <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Left" />
                            <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Right" />
                            <Setter Property="Template" TargetName="HeaderSite" Value="{StaticResource ExpanderLeftHeaderTemplate}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" TargetName="ExpandSite" Value="0.5" />
                            <Setter Property="Opacity" TargetName="HeaderSite" Value="0.5" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- TextBox -->
    <Style TargetType="{x:Type TextBox}">
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Setter Property="Background" Value="#FFFFFFFF" />
        <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="MinWidth" Value="0" />
        <Setter Property="MinHeight" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBox}">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FF000000" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.8" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.2" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="PART_ContentHost" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisabledLayer" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusedStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FF000000" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.8" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Inner" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.75" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border Background="#FFFFFFFF" BorderThickness="1" x:Name="White" BorderBrush="#FFFFFFFF" />
                        <Border Background="{TemplateBinding Background}" BorderThickness="1" x:Name="Background" Opacity="0.5">
                            <Border.BorderBrush>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="{StaticResource PrimaryColor}" />
                                    <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                </LinearGradientBrush>
                            </Border.BorderBrush>
                        </Border>
                        <Rectangle Fill="{x:Null}" Stroke="{DynamicResource SecondaryBrush}" Margin="1,1,1,1" x:Name="Inner" Opacity="0.2">
                            <Rectangle.OpacityMask>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFFFFFFF" Offset="0.196" />
                                    <GradientStop Color="#00000000" Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.OpacityMask>
                        </Rectangle>
                        <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="2,2,2,2" />
                        <Border x:Name="DisabledLayer" BorderBrush="{x:Null}" Visibility="Collapsed" >
                            <Border.Background>
                                <SolidColorBrush Color="{DynamicResource DisabledColor}"/>
                            </Border.Background>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" TargetName="PART_ContentHost" Value="0.2"/>
                            <Setter Property="Opacity" TargetName="Background" Value="0.2"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- PasswordBox -->
    <Style TargetType="{x:Type PasswordBox}">
        <Setter Property="Background" Value="#FFFFFFFF" />
        <Setter Property="BorderBrush" Value="{DynamicResource SecondaryBrush}" />
        <Setter Property="FontFamily" Value="Times New Roman" />
        <Setter Property="PasswordChar" Value="●" />
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type PasswordBox}">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FF000000" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.8" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="PART_ContentHost" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.2" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisableLayer" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusedStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FF000000" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.8" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle2" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.75" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle Fill="{TemplateBinding Background}" Stroke="#FFFFFFFF" x:Name="rectangle" />
                        <Rectangle Fill="#FFFFFFFF" Opacity="0.5" x:Name="rectangle1">
                            <Rectangle.Stroke>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0" />
                                    <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.Stroke>
                        </Rectangle>
                        <Rectangle Fill="{x:Null}" Stroke="{DynamicResource SecondaryBrush}" Margin="1,1,1,1" Opacity="0.2" x:Name="rectangle2">
                            <Rectangle.OpacityMask>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFFFFFFF" Offset="0.196" />
                                    <GradientStop Color="#00000000" Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.OpacityMask>
                        </Rectangle>
                        <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        <Rectangle x:Name="DisableLayer" StrokeThickness="0" Visibility="Collapsed" >
                            <Rectangle.Fill>
                                <SolidColorBrush Color="{DynamicResource DisabledColor}"/>
                            </Rectangle.Fill>
                        </Rectangle>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter Property="Stroke" TargetName="rectangle" Value="#FF000000"/>
                            <Setter Property="Opacity" TargetName="rectangle1" Value="0.8"/>
                            <Setter Property="Opacity" TargetName="rectangle2" Value="0.75"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Visibility" TargetName="DisableLayer" Value="Visible"/>
                            <Setter Property="Opacity" TargetName="PART_ContentHost" Value="0.2"/>
                            <Setter Property="Opacity" TargetName="rectangle1" Value="0.2"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- RichTextBox -->
    <Style TargetType="{x:Type RichTextBox}">
        <Style.Resources>
            <Style x:Key="{x:Type FlowDocument}" TargetType="{x:Type FlowDocument}">
                <Setter Property="OverridesDefaultStyle" Value="true" />
            </Style>
        </Style.Resources>
        <Setter Property="MinWidth" Value="10" />
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Setter Property="Background" Value="#FFFFFFFF" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBoxBase}">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FF000000" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.8" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.2" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="PART_ContentHost" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisableLayer" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusedStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FF000000" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.8" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle2" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.75" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="UnFocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle Fill="#FFFFFFFF" Stroke="#FFFFFFFF" x:Name="rectangle" />
                        <Rectangle Fill="{TemplateBinding Background}" Opacity="0.5" x:Name="rectangle1">
                            <Rectangle.Stroke>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0" />
                                    <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.Stroke>
                        </Rectangle>
                        <Rectangle Fill="{x:Null}" Stroke="{DynamicResource SecondaryBrush}" Margin="1,1,1,1" Opacity="0.2" x:Name="rectangle2">
                            <Rectangle.OpacityMask>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFFFFFFF" Offset="0.205" />
                                    <GradientStop Color="#00FFFFFF" Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.OpacityMask>
                        </Rectangle>
                        <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="2,2,2,2" Template="{DynamicResource ScrollViewer}" />
                        <Rectangle Stroke="#FFFFFFFF" x:Name="DisableLayer" Visibility="Collapsed" >
                            <Rectangle.Fill>
                                <SolidColorBrush Color="{DynamicResource DisabledColor}"/>
                            </Rectangle.Fill>
                        </Rectangle>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" TargetName="rectangle1" Value="0.2"/>
                            <Setter Property="Opacity" TargetName="PART_ContentHost" Value="0.2"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Thumb -->
    <Style TargetType="{x:Type Thumb}">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Foreground" Value="#FF000000" />
        <Setter Property="Background" Value="#FF1F3B53" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="0.5*" />
                            <RowDefinition Height="0.5*" />
                        </Grid.RowDefinitions>
                        <Rectangle Stroke="#FFFFFFFF" RadiusX="4" RadiusY="4" Grid.RowSpan="2" StrokeThickness="0.5">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFFFFFFF" Offset="0" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle Stroke="{TemplateBinding BorderBrush}" Grid.RowSpan="2" Opacity="0.8" RadiusX="4" RadiusY="4" StrokeThickness="0.5" x:Name="rectangle">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1.29" StartPoint="0.5,0">
                                    <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.67" />
                                    <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle Fill="{x:Null}" Stroke="#7FFFFFFF" Grid.RowSpan="2" RadiusX="3.5" RadiusY="3.5" Margin="0.5,0.5,0.5,0.5" StrokeThickness="0.5" x:Name="rectangle3" />
                        <Rectangle Grid.RowSpan="2" RadiusX="3.5" RadiusY="3.5" StrokeThickness="0.5" Margin="1,1,1,1" x:Name="rectangle1">
                            <Rectangle.OpacityMask>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <TranslateTransform X="0" Y="-0.5" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00FFFFFF" Offset="0.348" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Rectangle.OpacityMask>
                            <Rectangle.Fill>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.886" ScaleY="2.025" />
                                            <TranslateTransform X="-0.016" Y="0.512" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00FFFFFF" Offset="0.518" />
                                    <GradientStop Color="#33000000" Offset="1" />
                                </RadialGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Border Margin="0.5,0.5,0.5,0" CornerRadius="12,12,30,30" Opacity="0.8" x:Name="border">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.317" ScaleY="1.918" />
                                            <TranslateTransform X="0" Y="-0.505" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#BFFFFFFF" Offset="0" />
                                    <GradientStop Color="#4CFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Rectangle Stroke="#FF000000" Grid.RowSpan="2" RadiusX="4" RadiusY="4" StrokeThickness="0" Visibility="Collapsed" x:Name="rectangle2">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="{DynamicResource DisabledColor}" />
                            </Rectangle.Fill>
                        </Rectangle>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter Property="Stroke" TargetName="rectangle3" Value="#BF000000"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Fill" TargetName="rectangle">
                                <Setter.Value>
                                    <LinearGradientBrush EndPoint="0.5,1.29" StartPoint="0.5,0">
                                        <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0" />
                                        <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Opacity" TargetName="rectangle" Value="1" />
                            <Setter Property="Fill" TargetName="rectangle1">
                                <Setter.Value>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.886" ScaleY="2.025" />
                                                <TranslateTransform X="-0.016" Y="0.512" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00FFFFFF" Offset="0.518" />
                                        <GradientStop Color="#4C000000" Offset="1" />
                                    </RadialGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Opacity" TargetName="border" Value="1" />
                        </Trigger>
                        <Trigger Property="Foreground" Value="Blue" />
                        <Trigger Property="IsDragging" Value="true">
                            <Setter Property="Stroke" TargetName="rectangle3" Value="#7F515151" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Visibility" TargetName="rectangle2" Value="Visible" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Focusable" Value="True"/>
    </Style>

    <!-- Slider -->
    <Style TargetType="{x:Type Slider}">
        <Style.Resources>
            <Style x:Key="SliderRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
                <Setter Property="OverridesDefaultStyle" Value="true" />
                <Setter Property="IsTabStop" Value="false" />
                <Setter Property="Focusable" Value="false" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type RepeatButton}">
                            <Rectangle Fill="Transparent" />
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </Style.Resources>
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="#FFC4C4C4" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Slider}">
                    <Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <TickBar x:Name="TopTick" Height="4" Visibility="Collapsed" Fill="{TemplateBinding Foreground}" Placement="Top" />
                            <TickBar x:Name="BottomTick" Height="4" Visibility="Collapsed" Grid.Row="2" Fill="{TemplateBinding Foreground}" Placement="Bottom" />
                            <Border Margin="5,0" x:Name="TrackBackground" VerticalAlignment="center" Height="4.0" Grid.Row="1" Background="#FFE6EFF7" BorderBrush="#FFA3AEB9" BorderThickness="1" CornerRadius="1">
                                <Canvas Margin="-6,-1">
                                    <Rectangle Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" x:Name="PART_SelectionRange" Height="4.0" Visibility="Hidden" />
                                </Canvas>
                            </Border>
                            <Track x:Name="PART_Track" Grid.Row="1">
                                <Track.DecreaseRepeatButton>
                                    <RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.DecreaseLarge}" />
                                </Track.DecreaseRepeatButton>
                                <Track.IncreaseRepeatButton>
                                    <RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.IncreaseLarge}" />
                                </Track.IncreaseRepeatButton>
                                <Track.Thumb>
                                    <Thumb x:Name="Thumb" Width="11" Height="22" />
                                </Track.Thumb>
                            </Track>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TickPlacement" Value="TopLeft">
                            <Setter Property="Visibility" TargetName="TopTick" Value="Visible" />
                        </Trigger>
                        <Trigger Property="TickPlacement" Value="BottomRight">
                            <Setter Property="Visibility" TargetName="BottomTick" Value="Visible" />
                        </Trigger>
                        <Trigger Property="TickPlacement" Value="Both">
                            <Setter Property="Visibility" TargetName="TopTick" Value="Visible" />
                            <Setter Property="Visibility" TargetName="BottomTick" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsSelectionRangeEnabled" Value="true">
                            <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter Property="Foreground" TargetName="Thumb" Value="Blue" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Vertical">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Slider}">
                            <Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <TickBar x:Name="TopTick" Width="4" Visibility="Collapsed" Fill="{TemplateBinding Foreground}" Placement="Left" />
                                    <TickBar x:Name="BottomTick" Width="4" Visibility="Collapsed" Grid.Column="2" Fill="{TemplateBinding Foreground}" Placement="Right" />
                                    <Border HorizontalAlignment="center" Margin="0,5" x:Name="TrackBackground" Width="4.0" Grid.Column="1" BorderThickness="1" CornerRadius="1" Background="#FFE6EFF7" BorderBrush="#FFA3AEB9">
                                        <Canvas Margin="-1,-6">
                                            <Rectangle Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" x:Name="PART_SelectionRange" Width="4.0" Visibility="Hidden" />
                                        </Canvas>
                                    </Border>
                                    <Track x:Name="PART_Track" Grid.Column="1">
                                        <Track.DecreaseRepeatButton>
                                            <RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.DecreaseLarge}" />
                                        </Track.DecreaseRepeatButton>
                                        <Track.IncreaseRepeatButton>
                                            <RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.IncreaseLarge}" />
                                        </Track.IncreaseRepeatButton>
                                        <Track.Thumb>
                                            <Thumb x:Name="Thumb" RenderTransformOrigin="0.5,0.5" Width="22" Height="11"/>
                                        </Track.Thumb>
                                    </Track>
                                </Grid>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="TickPlacement" Value="TopLeft">
                                    <Setter Property="Visibility" TargetName="TopTick" Value="Visible" />
                                </Trigger>
                                <Trigger Property="TickPlacement" Value="BottomRight">
                                    <Setter Property="Visibility" TargetName="BottomTick" Value="Visible" />
                                </Trigger>
                                <Trigger Property="TickPlacement" Value="Both">
                                    <Setter Property="Visibility" TargetName="TopTick" Value="Visible" />
                                    <Setter Property="Visibility" TargetName="BottomTick" Value="Visible" />
                                </Trigger>
                                <Trigger Property="IsSelectionRangeEnabled" Value="true">
                                    <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible" />
                                </Trigger>
                                <Trigger Property="IsKeyboardFocused" Value="true">
                                    <Setter Property="Foreground" TargetName="Thumb" Value="Blue" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <!-- ScrollBar -->
    <Style TargetType="{x:Type ScrollBar}">
        <Style.Resources>
            <Style x:Key="ScrollBarButton" TargetType="{x:Type RepeatButton}">
                <Setter Property="OverridesDefaultStyle" Value="true" />
                <Setter Property="Focusable" Value="false" />
                <Setter Property="IsTabStop" Value="false" />
                <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
                <Setter Property="Background" Value="#00000000" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type RepeatButton}">
                            <Border Background="{TemplateBinding Background}">
                                <Path Fill="{TemplateBinding Foreground}" Stretch="Fill" Stroke="{x:Null}" Width="8" Height="4" Data="M3.9375,0.5 L7.5,3.5 0.5,3.5 z" />
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
                <Setter Property="OverridesDefaultStyle" Value="true" />
                <Setter Property="Background" Value="Transparent" />
                <Setter Property="Focusable" Value="false" />
                <Setter Property="IsTabStop" Value="false" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type RepeatButton}">
                            <Rectangle Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" />
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
                <Setter Property="OverridesDefaultStyle" Value="true" />
                <Setter Property="IsTabStop" Value="false" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Thumb}">
                            <Grid>
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Normal" />
                                        <VisualState x:Name="Pressed">
                                            <Storyboard>
                                                <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle2" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                    <SplineColorKeyFrame KeyTime="0" Value="#FF000000" />
                                                </ColorAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
                                                    <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                                                </DoubleAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Disabled">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle3" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="FocusStates">
                                        <VisualState x:Name="IsFocused">
                                            <Storyboard>
                                                <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle4" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
                                                    <SplineColorKeyFrame KeyTime="0" Value="#BF000000" />
                                                </ColorAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="UnFocused" />
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="0.5*" />
                                    <RowDefinition Height="0.5*" />
                                </Grid.RowDefinitions>
                                <Rectangle Stroke="#FFFFFFFF" RadiusX="4" RadiusY="4" StrokeThickness="1.2" Grid.RowSpan="2" x:Name="rectangle2">
                                    <Rectangle.Fill>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1" ScaleY="2.048" />
                                                    <TranslateTransform X="0" Y="0.021" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#FFFFFFFF" Offset="0" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Rectangle Stroke="{TemplateBinding BorderBrush}" Opacity="0.8" RadiusX="4" RadiusY="4" StrokeThickness="1.2" Grid.RowSpan="2" x:Name="rectangle">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1.308" StartPoint="0.5,0">
                                            <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.683" />
                                            <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Rectangle Fill="{x:Null}" Stroke="#7FFFFFFF" RadiusX="3.5" RadiusY="3.5" Margin="1,1,1,1" Grid.RowSpan="2" x:Name="rectangle4" />
                                <Rectangle Stroke="#FF000000" RadiusX="3.5" RadiusY="3.5" StrokeThickness="0" Margin="2,2,2,2" Grid.RowSpan="2" x:Name="rectangle1">
                                    <Rectangle.OpacityMask>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1" ScaleY="1.404" />
                                                    <TranslateTransform X="0" Y="-0.686" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#00000000" Offset="0.371" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Rectangle.OpacityMask>
                                    <Rectangle.Fill>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.288" ScaleY="2.638" />
                                                    <TranslateTransform X="0.012" Y="0.819" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#00000000" Offset="0.607" />
                                            <GradientStop Color="#33000000" Offset="1" />
                                        </RadialGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Border Grid.RowSpan="1" CornerRadius="6,6,40,40" Margin="1,1,1,0" Opacity="0.8" x:Name="border">
                                    <Border.Background>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1" ScaleY="2.057" />
                                                    <TranslateTransform X="0" Y="-0.529" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#BFFFFFFF" Offset="0" />
                                            <GradientStop Color="#4CFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Rectangle Stroke="{x:Null}" Grid.RowSpan="2" RadiusX="4" RadiusY="4" Visibility="Collapsed" x:Name="rectangle3">
                                    <Rectangle.Fill>
                                        <SolidColorBrush Color="{DynamicResource DisabledColor}" />
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </Style.Resources>
        <Setter Property="Background" Value="#FFFFFFFF" />
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="false" />
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
        <Setter Property="Width" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" />
        <Setter Property="MinWidth" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollBar}">
                    <Grid x:Name="Bg" SnapsToDevicePixels="true" Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="thumb" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.RowDefinitions>
                            <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
                            <RowDefinition Height="*" />
                            <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
                        </Grid.RowDefinitions>
                        <RepeatButton Style="{StaticResource ScrollBarButton}" IsEnabled="{TemplateBinding IsMouseOver}" Command="{x:Static ScrollBar.LineUpCommand}" />
                        <Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="1" IsDirectionReversed="true">
                            <Track.DecreaseRepeatButton>
                                <RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="{x:Static ScrollBar.PageUpCommand}" />
                            </Track.DecreaseRepeatButton>
                            <Track.IncreaseRepeatButton>
                                <RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="{x:Static ScrollBar.PageDownCommand}" />
                            </Track.IncreaseRepeatButton>
                            <Track.Thumb>
                                <Thumb Style="{StaticResource ScrollBarThumb}" x:Name="thumb" />
                            </Track.Thumb>
                        </Track>
                        <RepeatButton Style="{StaticResource ScrollBarButton}" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="2" Command="{x:Static ScrollBar.LineDownCommand}" RenderTransformOrigin="0.5,0.5">
                            <RepeatButton.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="1" ScaleY="-1" />
                                </TransformGroup>
                            </RepeatButton.RenderTransform>
                        </RepeatButton>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="Width" Value="Auto" />
                <Setter Property="MinWidth" Value="0" />
                <Setter Property="Height" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}" />
                <Setter Property="MinHeight" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ScrollBar}">
                            <Grid x:Name="Bg" SnapsToDevicePixels="true" Background="{TemplateBinding Background}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" />
                                    <ColumnDefinition Width="0.00001*" />
                                    <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}" />
                                </Grid.ColumnDefinitions>
                                <RepeatButton Style="{StaticResource ScrollBarButton}" IsEnabled="{TemplateBinding IsMouseOver}" Command="{x:Static ScrollBar.LineLeftCommand}" >
                                    <RepeatButton.LayoutTransform>
                                        <TransformGroup>
                                            <RotateTransform Angle="-90" />
                                        </TransformGroup>
                                    </RepeatButton.LayoutTransform>
                                </RepeatButton>
                                <Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Column="1">
                                    <Track.DecreaseRepeatButton>
                                        <RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="{x:Static ScrollBar.PageLeftCommand}" />
                                    </Track.DecreaseRepeatButton>
                                    <Track.IncreaseRepeatButton>
                                        <RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="{x:Static ScrollBar.PageRightCommand}" />
                                    </Track.IncreaseRepeatButton>
                                    <Track.Thumb>
                                        <Thumb Style="{StaticResource ScrollBarThumb}" />
                                    </Track.Thumb>
                                </Track>
                                <RepeatButton Style="{StaticResource ScrollBarButton}" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Column="2" Command="{x:Static ScrollBar.LineRightCommand}" >
                                    <RepeatButton.LayoutTransform>
                                        <TransformGroup>
                                            <RotateTransform Angle="90" />
                                        </TransformGroup>
                                    </RepeatButton.LayoutTransform>
                                </RepeatButton>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <!-- ScrollViewer -->
    <Style TargetType="{x:Type ScrollViewer}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Grid x:Name="Grid" Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Rectangle Fill="{TemplateBinding Background}" x:Name="Corner" Grid.Column="1" Grid.Row="1" />
                        <ScrollContentPresenter Margin="{TemplateBinding Padding}" x:Name="PART_ScrollContentPresenter" Grid.Column="0" Grid.Row="0" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" />
                        <ScrollBar Cursor="Arrow" x:Name="PART_VerticalScrollBar" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Grid.Column="1" Grid.Row="0" ViewportSize="{TemplateBinding ViewportHeight}" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" AutomationProperties.AutomationId="VerticalScrollBar" />
                        <ScrollBar Cursor="Arrow" x:Name="PART_HorizontalScrollBar" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Grid.Column="0" Grid.Row="1" Orientation="Horizontal" ViewportSize="{TemplateBinding ViewportWidth}" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Value="{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" AutomationProperties.AutomationId="HorizontalScrollBar" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Setter Property="Background" Value="#00FFFFFF" />
    </Style>

    <!-- FlowDocumentScrollViewer -->
    <Style TargetType="{x:Type FlowDocumentScrollViewer}">
        <Setter Property="Background" Value="#00FFFFFF" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Local" />
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.263" />
                    <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="1,1,1,1" />
        <Setter Property="IsToolBarVisible" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type FlowDocumentScrollViewer}">
                    <Grid Language="en-us" Uid="Grid_26">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Border Margin="{TemplateBinding Padding}" Uid="Border_49" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="4,4,4,4">
                            <ScrollViewer HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_ContentHost" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Uid="ScrollViewer_8" CanContentScroll="True" />
                        </Border>
                        <Border x:Name="PART_ToolBarHost" Uid="Border_51" Grid.Row="1" Background="{TemplateBinding Background}">
                            <Grid Uid="Grid_34">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Border HorizontalAlignment="Left" x:Name="PART_FindToolBarHost" VerticalAlignment="Center" Uid="Border_61" Visibility="Collapsed" />
                                <Grid HorizontalAlignment="Right" VerticalAlignment="Center" Uid="Grid_27" Grid.Column="1">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <RepeatButton ToolTip="Decrease Zoom" Width="{TemplateBinding FontSize}" Height="{TemplateBinding FontSize}" BorderBrush="{TemplateBinding BorderBrush}" Foreground="{TemplateBinding Foreground}" IsEnabled="{TemplateBinding CanDecreaseZoom}" Uid="RepeatButton_7" Command="NavigationCommands.DecreaseZoom">
                                        <RepeatButton.Style>
                                            <Style TargetType="{x:Type RepeatButton}">
                                                <Setter Property="Padding" Value="2,2,0,2" />
                                                <Setter Property="Template">
                                                    <Setter.Value>
                                                        <ControlTemplate TargetType="{x:Type RepeatButton}">
                                                            <Border Uid="Border_41" Background="#00FFFFFF" Padding="{Binding Path=Padding, RelativeSource={RelativeSource TemplatedParent}}">
                                                                <Viewbox x:Name="Content" RenderTransformOrigin="0.5,0.5" Uid="Viewbox_2">
                                                                    <Grid Width="32" Height="32" Uid="Canvas_4">
                                                                        <Grid.RowDefinitions>
                                                                            <RowDefinition Height="0.496*" />
                                                                            <RowDefinition Height="0.504*" />
                                                                        </Grid.RowDefinitions>
                                                                        <Ellipse Stroke="#FFFFFFFF" StrokeThickness="0.5" Grid.RowSpan="2" x:Name="ellipse3">
                                                                            <Ellipse.Fill>
                                                                                <RadialGradientBrush>
                                                                                    <GradientStop Color="#FFFFFFFF" Offset="0" />
                                                                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                                                                </RadialGradientBrush>
                                                                            </Ellipse.Fill>
                                                                        </Ellipse>
                                                                        <Ellipse Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.5" Grid.RowSpan="2" x:Name="ellipse" Opacity="0.65">
                                                                            <Ellipse.Fill>
                                                                                <LinearGradientBrush EndPoint="0.5,1.253" StartPoint="0.5,0">
                                                                                    <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.71" />
                                                                                    <GradientStop Color="{DynamicResource SecondaryColor}" Offset="0.991" />
                                                                                </LinearGradientBrush>
                                                                            </Ellipse.Fill>
                                                                        </Ellipse>
                                                                        <Ellipse Fill="{TemplateBinding Background}" Stroke="#7FFFFFFF" StrokeThickness="0.5" Margin="0.5,0.5,0.5,0.5" Grid.RowSpan="2" x:Name="ellipse4" />
                                                                        <Ellipse Margin="1,1,1,1" Grid.RowSpan="2" x:Name="ellipse1">
                                                                            <Ellipse.OpacityMask>
                                                                                <RadialGradientBrush>
                                                                                    <RadialGradientBrush.RelativeTransform>
                                                                                        <TransformGroup>
                                                                                            <TranslateTransform X="0" Y="-0.49" />
                                                                                        </TransformGroup>
                                                                                    </RadialGradientBrush.RelativeTransform>
                                                                                    <GradientStop Color="#00FFFFFF" Offset="0.433" />
                                                                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                                                                </RadialGradientBrush>
                                                                            </Ellipse.OpacityMask>
                                                                            <Ellipse.Fill>
                                                                                <RadialGradientBrush>
                                                                                    <RadialGradientBrush.RelativeTransform>
                                                                                        <TransformGroup>
                                                                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.336" ScaleY="1.621" />
                                                                                            <TranslateTransform X="0.01" Y="0.398" />
                                                                                        </TransformGroup>
                                                                                    </RadialGradientBrush.RelativeTransform>
                                                                                    <GradientStop Color="#00000000" Offset="0.509" />
                                                                                    <GradientStop Color="#33000000" Offset="1" />
                                                                                </RadialGradientBrush>
                                                                            </Ellipse.Fill>
                                                                        </Ellipse>
                                                                        <Ellipse Stroke="{x:Null}" HorizontalAlignment="Stretch" Margin="8.121,1,8,-0.121" Opacity="0.5" x:Name="ellipse2">
                                                                            <Ellipse.Fill>
                                                                                <RadialGradientBrush>
                                                                                    <RadialGradientBrush.RelativeTransform>
                                                                                        <TransformGroup>
                                                                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.028" ScaleY="1.573" />
                                                                                            <TranslateTransform X="0.017" Y="-0.269" />
                                                                                        </TransformGroup>
                                                                                    </RadialGradientBrush.RelativeTransform>
                                                                                    <GradientStop Color="#BFFFFFFF" Offset="0" />
                                                                                    <GradientStop Color="#4CFFFFFF" Offset="1" />
                                                                                </RadialGradientBrush>
                                                                            </Ellipse.Fill>
                                                                        </Ellipse>
                                                                        <Path Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource TemplatedParent}}" StrokeThickness="3" Uid="Path_9" HorizontalAlignment="Right" Margin="0,0.121,6,0" VerticalAlignment="Top" Grid.Row="1">
                                                                            <Path.Data>
                                                                                <LineGeometry EndPoint="10,0" StartPoint="-10,0" />
                                                                            </Path.Data>
                                                                        </Path>
                                                                    </Grid>
                                                                </Viewbox>
                                                            </Border>
                                                            <ControlTemplate.Triggers>
                                                                <Trigger Property="IsMouseOver" Value="True">
                                                                    <Setter Property="Fill" TargetName="ellipse">
                                                                        <Setter.Value>
                                                                            <LinearGradientBrush EndPoint="0.5,1.253" StartPoint="0.5,0">
                                                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0" />
                                                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="0.991" />
                                                                            </LinearGradientBrush>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Fill" TargetName="ellipse1">
                                                                        <Setter.Value>
                                                                            <RadialGradientBrush>
                                                                                <RadialGradientBrush.RelativeTransform>
                                                                                    <TransformGroup>
                                                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.336" ScaleY="1.621" />
                                                                                        <TranslateTransform X="0.01" Y="0.398" />
                                                                                    </TransformGroup>
                                                                                </RadialGradientBrush.RelativeTransform>
                                                                                <GradientStop Color="#00000000" Offset="0.509" />
                                                                                <GradientStop Color="#4C000000" Offset="1" />
                                                                            </RadialGradientBrush>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Opacity" TargetName="ellipse2" Value="0.8" />
                                                                </Trigger>
                                                                <Trigger Property="IsPressed" Value="True">
                                                                    <Setter Property="RenderTransform" TargetName="Content">
                                                                        <Setter.Value>
                                                                            <ScaleTransform ScaleX="1" ScaleY="1" />
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Fill" TargetName="ellipse3">
                                                                        <Setter.Value>
                                                                            <RadialGradientBrush>
                                                                                <GradientStop Color="#FF000000" Offset="0" />
                                                                                <GradientStop Color="#FFFFFFFF" Offset="1" />
                                                                            </RadialGradientBrush>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Fill" TargetName="ellipse">
                                                                        <Setter.Value>
                                                                            <LinearGradientBrush EndPoint="0.5,1.253" StartPoint="0.5,0">
                                                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0" />
                                                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="0.991" />
                                                                            </LinearGradientBrush>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Opacity" TargetName="ellipse" Value="1" />
                                                                    <Setter Property="Fill" TargetName="ellipse1">
                                                                        <Setter.Value>
                                                                            <RadialGradientBrush>
                                                                                <RadialGradientBrush.RelativeTransform>
                                                                                    <TransformGroup>
                                                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.336" ScaleY="1.621" />
                                                                                        <TranslateTransform X="0.01" Y="0.398" />
                                                                                    </TransformGroup>
                                                                                </RadialGradientBrush.RelativeTransform>
                                                                                <GradientStop Color="#00000000" Offset="0.509" />
                                                                                <GradientStop Color="#4C000000" Offset="1" />
                                                                            </RadialGradientBrush>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Opacity" TargetName="ellipse1" Value="0.65" />
                                                                    <Setter Property="Opacity" TargetName="ellipse2" Value="0.8" />
                                                                    <Setter Property="Stroke" TargetName="ellipse4" Value="#7F000000" />
                                                                </Trigger>
                                                            </ControlTemplate.Triggers>
                                                        </ControlTemplate>
                                                    </Setter.Value>
                                                </Setter>
                                                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                                                <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
                                                <Setter Property="Opacity" Value="1" />
                                                <Style.BasedOn>
                                                    <Style TargetType="{x:Type RepeatButton}">
                                                        <Setter Property="Padding" Value="5,5,5,5" />
                                                        <Setter Property="Delay" Value="1000" />
                                                        <Setter Property="Interval" Value="250" />
                                                        <Style.BasedOn>
                                                            <Style TargetType="{x:Type ButtonBase}">
                                                                <Setter Property="Focusable" Value="False" />
                                                                <Setter Property="Opacity" Value="0.5" />
                                                                <Setter Property="Cursor" Value="Hand" />
                                                                <Setter Property="Background" Value="#00FFFFFF" />
                                                                <Setter Property="Padding" Value="3,1,3,1" />
                                                                <Setter Property="BorderBrush" Value="{x:Null}" />
                                                                <Setter Property="BorderThickness" Value="0,0,0,0" />
                                                                <Setter Property="MinWidth" Value="0" />
                                                                <Setter Property="MinHeight" Value="0" />
                                                                <Setter Property="Template">
                                                                    <Setter.Value>
                                                                        <ControlTemplate TargetType="{x:Type ButtonBase}">
                                                                            <Border Uid="Border_39" Background="{TemplateBinding Background}">
                                                                                <ContentPresenter x:Name="Content" RenderTransformOrigin="0.5,0.5" Uid="ContentPresenter_2" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                                                                            </Border>
                                                                            <ControlTemplate.Triggers>
                                                                                <Trigger Property="IsMouseOver" Value="True">
                                                                                    <Setter Property="RenderTransform" TargetName="Content">
                                                                                        <Setter.Value>
                                                                                            <ScaleTransform ScaleX="1.1" ScaleY="1.1" />
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                </Trigger>
                                                                                <Trigger Property="IsPressed" Value="True">
                                                                                    <Setter Property="RenderTransform" TargetName="Content">
                                                                                        <Setter.Value>
                                                                                            <ScaleTransform ScaleX="0.9" ScaleY="0.9" />
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                </Trigger>
                                                                            </ControlTemplate.Triggers>
                                                                        </ControlTemplate>
                                                                    </Setter.Value>
                                                                </Setter>
                                                                <Style.Triggers>
                                                                    <Trigger Property="IsEnabled" Value="False">
                                                                        <Setter Property="Opacity" Value="0.3" />
                                                                    </Trigger>
                                                                    <Trigger Property="IsMouseOver" Value="True">
                                                                        <Setter Property="Opacity" Value="1" />
                                                                    </Trigger>
                                                                </Style.Triggers>
                                                            </Style>
                                                        </Style.BasedOn>
                                                    </Style>
                                                </Style.BasedOn>
                                            </Style>
                                        </RepeatButton.Style>
                                        <RepeatButton.LayoutTransform>
                                            <ScaleTransform ScaleX="2.2" ScaleY="2.2" />
                                        </RepeatButton.LayoutTransform>
                                    </RepeatButton>
                                    <Slider HorizontalAlignment="Stretch" VerticalAlignment="Center" MinWidth="50" FontSize="{TemplateBinding FontSize}" Uid="Slider_2" Grid.Column="1" TickFrequency="{TemplateBinding ZoomIncrement}" LargeChange="{TemplateBinding ZoomIncrement}" Maximum="{TemplateBinding MaxZoom}" Minimum="{TemplateBinding MinZoom}" SmallChange="{TemplateBinding ZoomIncrement}" Value="{Binding Path=Zoom, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                                    <RepeatButton ToolTip="Increase Zoom" Width="{TemplateBinding FontSize}" Height="{TemplateBinding FontSize}" BorderBrush="{TemplateBinding BorderBrush}" Foreground="{TemplateBinding Foreground}" IsEnabled="{TemplateBinding CanIncreaseZoom}" Uid="RepeatButton_8" Grid.Column="2" Command="NavigationCommands.IncreaseZoom">
                                        <RepeatButton.Style>
                                            <Style TargetType="{x:Type RepeatButton}">
                                                <Setter Property="Padding" Value="2,2,0,2" />
                                                <Setter Property="Template">
                                                    <Setter.Value>
                                                        <ControlTemplate TargetType="{x:Type RepeatButton}">
                                                            <Border Uid="Border_41" Background="#00FFFFFF" Padding="{Binding Path=Padding, RelativeSource={RelativeSource TemplatedParent}}">
                                                                <Viewbox x:Name="Content" RenderTransformOrigin="0.5,0.5" Uid="Viewbox_2">
                                                                    <Grid Width="32" Height="32" Uid="Canvas_4">
                                                                        <Grid.RowDefinitions>
                                                                            <RowDefinition Height="0.496*" />
                                                                            <RowDefinition Height="0.504*" />
                                                                        </Grid.RowDefinitions>
                                                                        <Ellipse Stroke="#FFFFFFFF" StrokeThickness="0.5" Grid.RowSpan="2" x:Name="ellipse3">
                                                                            <Ellipse.Fill>
                                                                                <RadialGradientBrush>
                                                                                    <GradientStop Color="#FFFFFFFF" Offset="0" />
                                                                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                                                                </RadialGradientBrush>
                                                                            </Ellipse.Fill>
                                                                        </Ellipse>
                                                                        <Ellipse Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.5" Grid.RowSpan="2" x:Name="ellipse" Opacity="0.65">
                                                                            <Ellipse.Fill>
                                                                                <LinearGradientBrush EndPoint="0.5,1.253" StartPoint="0.5,0">
                                                                                    <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.71" />
                                                                                    <GradientStop Color="{DynamicResource SecondaryColor}" Offset="0.991" />
                                                                                </LinearGradientBrush>
                                                                            </Ellipse.Fill>
                                                                        </Ellipse>
                                                                        <Ellipse Fill="{TemplateBinding Background}" Stroke="#7FFFFFFF" StrokeThickness="0.5" Margin="0.5,0.5,0.5,0.5" Grid.RowSpan="2" x:Name="ellipse4" />
                                                                        <Ellipse Margin="1,1,1,1" Grid.RowSpan="2" x:Name="ellipse1">
                                                                            <Ellipse.OpacityMask>
                                                                                <RadialGradientBrush>
                                                                                    <RadialGradientBrush.RelativeTransform>
                                                                                        <TransformGroup>
                                                                                            <TranslateTransform X="0" Y="-0.49" />
                                                                                        </TransformGroup>
                                                                                    </RadialGradientBrush.RelativeTransform>
                                                                                    <GradientStop Color="#00FFFFFF" Offset="0.433" />
                                                                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                                                                </RadialGradientBrush>
                                                                            </Ellipse.OpacityMask>
                                                                            <Ellipse.Fill>
                                                                                <RadialGradientBrush>
                                                                                    <RadialGradientBrush.RelativeTransform>
                                                                                        <TransformGroup>
                                                                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.336" ScaleY="1.621" />
                                                                                            <TranslateTransform X="0.01" Y="0.398" />
                                                                                        </TransformGroup>
                                                                                    </RadialGradientBrush.RelativeTransform>
                                                                                    <GradientStop Color="#00000000" Offset="0.509" />
                                                                                    <GradientStop Color="#33000000" Offset="1" />
                                                                                </RadialGradientBrush>
                                                                            </Ellipse.Fill>
                                                                        </Ellipse>
                                                                        <Ellipse Stroke="{x:Null}" HorizontalAlignment="Stretch" Margin="8.121,1,8,-0.121" Opacity="0.5" x:Name="ellipse2">
                                                                            <Ellipse.Fill>
                                                                                <RadialGradientBrush>
                                                                                    <RadialGradientBrush.RelativeTransform>
                                                                                        <TransformGroup>
                                                                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.028" ScaleY="1.573" />
                                                                                            <TranslateTransform X="0.017" Y="-0.269" />
                                                                                        </TransformGroup>
                                                                                    </RadialGradientBrush.RelativeTransform>
                                                                                    <GradientStop Color="#BFFFFFFF" Offset="0" />
                                                                                    <GradientStop Color="#4CFFFFFF" Offset="1" />
                                                                                </RadialGradientBrush>
                                                                            </Ellipse.Fill>
                                                                        </Ellipse>
                                                                        <Path Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource TemplatedParent}}" StrokeThickness="3" Uid="Path_12"  Grid.RowSpan="1" HorizontalAlignment="Right" VerticalAlignment="Stretch" Grid.Row="1" Margin="0,0,6,6">
                                                                            <Path.Data>
                                                                                <GeometryGroup>
                                                                                    <LineGeometry EndPoint="10,0" StartPoint="-10,0" />
                                                                                    <LineGeometry EndPoint="0,10" StartPoint="0,-10" />
                                                                                </GeometryGroup>
                                                                            </Path.Data>
                                                                        </Path>
                                                                    </Grid>
                                                                </Viewbox>
                                                            </Border>
                                                            <ControlTemplate.Triggers>
                                                                <Trigger Property="IsMouseOver" Value="True">
                                                                    <Setter Property="Fill" TargetName="ellipse">
                                                                        <Setter.Value>
                                                                            <LinearGradientBrush EndPoint="0.5,1.253" StartPoint="0.5,0">
                                                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0" />
                                                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="0.991" />
                                                                            </LinearGradientBrush>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Fill" TargetName="ellipse1">
                                                                        <Setter.Value>
                                                                            <RadialGradientBrush>
                                                                                <RadialGradientBrush.RelativeTransform>
                                                                                    <TransformGroup>
                                                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.336" ScaleY="1.621" />
                                                                                        <TranslateTransform X="0.01" Y="0.398" />
                                                                                    </TransformGroup>
                                                                                </RadialGradientBrush.RelativeTransform>
                                                                                <GradientStop Color="#00000000" Offset="0.509" />
                                                                                <GradientStop Color="#4C000000" Offset="1" />
                                                                            </RadialGradientBrush>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Opacity" TargetName="ellipse2" Value="0.8" />
                                                                </Trigger>
                                                                <Trigger Property="IsPressed" Value="True">
                                                                    <Setter Property="RenderTransform" TargetName="Content">
                                                                        <Setter.Value>
                                                                            <ScaleTransform ScaleX="1" ScaleY="1" />
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Fill" TargetName="ellipse3">
                                                                        <Setter.Value>
                                                                            <RadialGradientBrush>
                                                                                <GradientStop Color="#FF000000" Offset="0" />
                                                                                <GradientStop Color="#FFFFFFFF" Offset="1" />
                                                                            </RadialGradientBrush>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Fill" TargetName="ellipse">
                                                                        <Setter.Value>
                                                                            <LinearGradientBrush EndPoint="0.5,1.253" StartPoint="0.5,0">
                                                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0" />
                                                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="0.991" />
                                                                            </LinearGradientBrush>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Opacity" TargetName="ellipse" Value="1" />
                                                                    <Setter Property="Fill" TargetName="ellipse1">
                                                                        <Setter.Value>
                                                                            <RadialGradientBrush>
                                                                                <RadialGradientBrush.RelativeTransform>
                                                                                    <TransformGroup>
                                                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.336" ScaleY="1.621" />
                                                                                        <TranslateTransform X="0.01" Y="0.398" />
                                                                                    </TransformGroup>
                                                                                </RadialGradientBrush.RelativeTransform>
                                                                                <GradientStop Color="#00000000" Offset="0.509" />
                                                                                <GradientStop Color="#4C000000" Offset="1" />
                                                                            </RadialGradientBrush>
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                    <Setter Property="Opacity" TargetName="ellipse1" Value="0.65" />
                                                                    <Setter Property="Opacity" TargetName="ellipse2" Value="0.8" />
                                                                    <Setter Property="Stroke" TargetName="ellipse4" Value="#7F000000" />
                                                                </Trigger>
                                                            </ControlTemplate.Triggers>
                                                        </ControlTemplate>
                                                    </Setter.Value>
                                                </Setter>
                                                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                                                <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
                                                <Setter Property="Opacity" Value="1" />
                                                <Style.BasedOn>
                                                    <Style TargetType="{x:Type RepeatButton}">
                                                        <Setter Property="Padding" Value="5,5,5,5" />
                                                        <Setter Property="Delay" Value="1000" />
                                                        <Setter Property="Interval" Value="250" />
                                                        <Style.BasedOn>
                                                            <Style TargetType="{x:Type ButtonBase}">
                                                                <Setter Property="Focusable" Value="False" />
                                                                <Setter Property="Opacity" Value="0.5" />
                                                                <Setter Property="Cursor" Value="Hand" />
                                                                <Setter Property="Background" Value="#00FFFFFF" />
                                                                <Setter Property="Padding" Value="3,1,3,1" />
                                                                <Setter Property="BorderBrush" Value="{x:Null}" />
                                                                <Setter Property="BorderThickness" Value="0,0,0,0" />
                                                                <Setter Property="MinWidth" Value="0" />
                                                                <Setter Property="MinHeight" Value="0" />
                                                                <Setter Property="Template">
                                                                    <Setter.Value>
                                                                        <ControlTemplate TargetType="{x:Type ButtonBase}">
                                                                            <Border Uid="Border_39" Background="{TemplateBinding Background}">
                                                                                <ContentPresenter x:Name="Content" RenderTransformOrigin="0.5,0.5" Uid="ContentPresenter_2" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                                                                            </Border>
                                                                            <ControlTemplate.Triggers>
                                                                                <Trigger Property="IsMouseOver" Value="True">
                                                                                    <Setter Property="RenderTransform" TargetName="Content">
                                                                                        <Setter.Value>
                                                                                            <ScaleTransform ScaleX="1.1" ScaleY="1.1" />
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                </Trigger>
                                                                                <Trigger Property="IsPressed" Value="True">
                                                                                    <Setter Property="RenderTransform" TargetName="Content">
                                                                                        <Setter.Value>
                                                                                            <ScaleTransform ScaleX="0.9" ScaleY="0.9" />
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                </Trigger>
                                                                            </ControlTemplate.Triggers>
                                                                        </ControlTemplate>
                                                                    </Setter.Value>
                                                                </Setter>
                                                                <Style.Triggers>
                                                                    <Trigger Property="IsEnabled" Value="False">
                                                                        <Setter Property="Opacity" Value="0.3" />
                                                                    </Trigger>
                                                                    <Trigger Property="IsMouseOver" Value="True">
                                                                        <Setter Property="Opacity" Value="1" />
                                                                    </Trigger>
                                                                </Style.Triggers>
                                                            </Style>
                                                        </Style.BasedOn>
                                                    </Style>
                                                </Style.BasedOn>
                                            </Style>
                                        </RepeatButton.Style>
                                        <RepeatButton.LayoutTransform>
                                            <ScaleTransform ScaleX="2.2" ScaleY="2.2" />
                                        </RepeatButton.LayoutTransform>
                                    </RepeatButton>
                                </Grid>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ListBox -->
    <Style TargetType="{x:Type ListBox}">
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0" />
                    <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBox}">
                    <Border x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="1" CornerRadius="4,4,4,4">
                        <Grid>
                            <ScrollViewer Padding="{TemplateBinding Padding}" Focusable="false" x:Name="scrollViewer">
                                <!--<StackPanel Margin="2" IsItemsHost="true"/>-->

                                <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </ScrollViewer>
                            <Border CornerRadius="4,4,4,4" Visibility="Collapsed" x:Name="border" Margin="-2,-2,-2,-2">
                                <Border.Background>
                                    <SolidColorBrush Color="{DynamicResource DisabledColor}"/>
                                </Border.Background>
                            </Border>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Visibility" TargetName="border" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="IsGrouping" Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ListBoxItem -->
    <Style TargetType="{x:Type ListBoxItem}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Setter Property="MinHeight" Value="30" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Border x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.3000000" To="MouseOver" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="HoverGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.3000000"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Selectebasicrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused"/>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <Rectangle x:Name="rectangleSelected" Opacity="0" RadiusX="3" RadiusY="3" >
                                <Rectangle.Stroke>
                                    <SolidColorBrush Color="#7F4392C7" />
                                </Rectangle.Stroke>
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#594392C7" Offset="0"/>
                                        <GradientStop Color="#59A0FCFF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Rectangle x:Name="rectangle" Opacity="0" Stroke="{x:Null}" RadiusX="3" RadiusY="3" >
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#334392C7" Offset="0"/>
                                        <GradientStop Color="#33A0FCFF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Grid x:Name="HoverGrid" Opacity="0">
                                <Border CornerRadius="4" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1.2">
                                    <Border.Background>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#FFFFFFFF" Offset="0" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" CornerRadius="4" x:Name="Background" Opacity="0.65">
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                            <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                            <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border Background="{TemplateBinding Background}" BorderBrush="#7FFFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder" Margin="1" />
                                <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
                                    <Border.OpacityMask>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <TranslateTransform X="0" Y="-0.5" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.OpacityMask>
                                    <Border.Background>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                    <TranslateTransform Y="0.65" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#00000000" Offset="0.55" />
                                            <GradientStop Color="#33000000" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border Margin="1,1,1,10" CornerRadius="4,4,40,40" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                                    <Border.Background>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                    <TranslateTransform Y="-0.6" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#BFFFFFFF" Offset="0" />
                                            <GradientStop Color="#4CFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.Background>
                                </Border>
                            </Grid>
                            <Grid x:Name="Selectebasicrid" Opacity="0">
                                <Border CornerRadius="4" x:Name="White1" BorderBrush="#FFFFFFFF" BorderThickness="1.2">
                                    <Border.Background>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#FFFFFFFF" Offset="0" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" CornerRadius="4" x:Name="Background1" Opacity="0.65">
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                            <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                            <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border Background="{TemplateBinding Background}" BorderBrush="#7FFFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder1" Margin="1" />
                                <Border CornerRadius="3.5" x:Name="Shadow1" Margin="2" Grid.RowSpan="2">
                                    <Border.OpacityMask>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <TranslateTransform X="0" Y="-0.5" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.OpacityMask>
                                    <Border.Background>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                    <TranslateTransform Y="0.65" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#00000000" Offset="0.55" />
                                            <GradientStop Color="#33000000" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border Margin="1,1,1,10" CornerRadius="4,4,40,40" x:Name="Highlight1" Opacity="0.8" RenderTransformOrigin="0.5,1">
                                    <Border.Background>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                    <TranslateTransform Y="-0.6" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#BFFFFFFF" Offset="0" />
                                            <GradientStop Color="#4CFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.Background>
                                </Border>
                            </Grid>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" x:Name="contentPresenter" />
                            <Rectangle x:Name="FocusVisualElement" Visibility="Collapsed" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="1" RadiusY="1" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- TabControl -->
    <Style TargetType="{x:Type TabControl}">
        <Setter Property="Background" Value="#FFFFFFFF" />
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
        <Setter Property="Padding" Value="4,4,4,4" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition x:Name="ColumnDefinition0" />
                            <ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition x:Name="RowDefinition0" Height="Auto" />
                            <RowDefinition x:Name="RowDefinition1" Height="*" />
                        </Grid.RowDefinitions>
                        <TabPanel Margin="2,2,2,-1" x:Name="HeaderPanel" IsItemsHost="true" Panel.ZIndex="1" KeyboardNavigation.TabIndex="1" />
                        <Border x:Name="ContentPanel" Grid.Row="1" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local" CornerRadius="0,0,3,3">
                            <Border.BorderBrush>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.232" />
                                    <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                </LinearGradientBrush>
                            </Border.BorderBrush>
                            <Grid Margin="3,3,3,3">
                                <ContentPresenter Margin="1,1,1,1" x:Name="PART_SelectedContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="SelectedContent" />
                            </Grid>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TabStripPlacement" Value="Bottom">
                            <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="1" />
                            <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
                            <Setter Property="Height" TargetName="RowDefinition0" Value="*" />
                            <Setter Property="Height" TargetName="RowDefinition1" Value="Auto" />
                            <Setter Property="Margin" TargetName="HeaderPanel" Value="2,-1,2,2" />
                            <Setter Property="CornerRadius" TargetName="ContentPanel" Value="3,3,0,0" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Left">
                            <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0" />
                            <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
                            <Setter Property="Grid.Column" TargetName="HeaderPanel" Value="0" />
                            <Setter Property="Grid.Column" TargetName="ContentPanel" Value="1" />
                            <Setter Property="Width" TargetName="ColumnDefinition0" Value="Auto" />
                            <Setter Property="Width" TargetName="ColumnDefinition1" Value="*" />
                            <Setter Property="Height" TargetName="RowDefinition0" Value="*" />
                            <Setter Property="Height" TargetName="RowDefinition1" Value="0" />
                            <Setter Property="Margin" TargetName="HeaderPanel" Value="2,2,-1,2" />
                            <Setter Property="CornerRadius" TargetName="ContentPanel" Value="0,3,3,0" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Right">
                            <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0" />
                            <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
                            <Setter Property="Grid.Column" TargetName="HeaderPanel" Value="1" />
                            <Setter Property="Grid.Column" TargetName="ContentPanel" Value="0" />
                            <Setter Property="Width" TargetName="ColumnDefinition0" Value="*" />
                            <Setter Property="Width" TargetName="ColumnDefinition1" Value="Auto" />
                            <Setter Property="Height" TargetName="RowDefinition0" Value="*" />
                            <Setter Property="Height" TargetName="RowDefinition1" Value="0" />
                            <Setter Property="Margin" TargetName="HeaderPanel" Value="-1,2,2,2" />
                            <Setter Property="CornerRadius" TargetName="ContentPanel" Value="3,0,0,3" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- TabItem -->
    <Style TargetType="{x:Type TabItem}">
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Setter Property="Padding" Value="6,1,6,1" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="Background" Value="#FFFFFFFF" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid SnapsToDevicePixels="true">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="0.505*" />
                            <RowDefinition Height="0.495*" />
                        </Grid.RowDefinitions>
                        <Border Grid.RowSpan="2" BorderBrush="#FFFFFFFF" BorderThickness="1.2,1.2,1.2,1.2" CornerRadius="3,3,0,0" x:Name="border">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFFFFFFF" Offset="0" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Grid.RowSpan="2" Opacity="0.65" BorderThickness="1.2,1.2,1.2,1.2" CornerRadius="3,3,0,0" BorderBrush="{TemplateBinding BorderBrush}" x:Name="border1">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1.305" StartPoint="0.5,0">
                                    <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.721" />
                                    <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Grid.RowSpan="2" Background="#00FFFFFF" BorderBrush="#7FFFFFFF" BorderThickness="1,1,1,1" CornerRadius="2,2,0,0" Margin="1,1,1,1" x:Name="border2" />
                        <Border Grid.RowSpan="2" CornerRadius="2,2,0,0" Margin="2,2,2,2" x:Name="border3">
                            <Border.OpacityMask>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.272" ScaleY="1.099" />
                                            <TranslateTransform X="0" Y="-0.548" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00FFFFFF" Offset="0.431" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.OpacityMask>
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.535" ScaleY="2.412" />
                                            <TranslateTransform X="-0.015" Y="0.463" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00FFFFFF" Offset="0.549" />
                                    <GradientStop Color="#33000000" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Grid.RowSpan="1" CornerRadius="4,4,40,40" Margin="1,1,1,0" x:Name="border4" Opacity="0.665">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1" ScaleY="2.127" />
                                            <TranslateTransform X="0" Y="-0.563" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#BFFFFFFF" Offset="0" />
                                    <GradientStop Color="#4CFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border x:Name="BdSelected" BorderThickness="1,1,1,0" Grid.RowSpan="2" CornerRadius="3,3,0,0" Visibility="Collapsed" Background="{TemplateBinding Background}" BorderBrush="#FFFFFFFF" />
                        <Border Grid.RowSpan="2" CornerRadius="3,3,0,0" BorderBrush="{DynamicResource PrimaryBrush}" BorderThickness="1,1,1,0" Visibility="Collapsed" x:Name="borderSelected" />
                        <Border x:Name="SelectedBG" Grid.RowSpan="2" Visibility="Collapsed" BorderBrush="#FFFFFFFF" BorderThickness="1,1,1,0" CornerRadius="2,2,0,0" Margin="1,1,1,0" />
                        <Border x:Name="Selected" Grid.RowSpan="2" Visibility="Collapsed" CornerRadius="1,1,1,1" Margin="2,2,2,0">
                            <Border.OpacityMask>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#4C000000" Offset="0" />
                                    <GradientStop Color="#00FFFFFF" Offset="1" />
                                </LinearGradientBrush>
                            </Border.OpacityMask>
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,0.612" StartPoint="0.5,-0.388">
                                    <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0" />
                                    <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <ContentPresenter HorizontalAlignment="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" x:Name="Content" VerticalAlignment="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Header" RecognizesAccessKey="True" Grid.RowSpan="2" Margin="{TemplateBinding Padding}" />
                        <Border BorderBrush="{x:Null}" CornerRadius="3,3,0,0" x:Name="Disabled" Grid.RowSpan="2" Background="#8CFFFFFF" Visibility="Collapsed" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Opacity" TargetName="border1" Value="1" />
                            <Setter Property="Opacity" TargetName="border4" Value="1" />
                            <Setter Property="Background" TargetName="border1">
                                <Setter.Value>
                                    <LinearGradientBrush EndPoint="0.5,1.305" StartPoint="0.5,0">
                                        <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.147" />
                                        <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Background" TargetName="border3">
                                <Setter.Value>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.535" ScaleY="2.412" />
                                                <TranslateTransform X="-0.015" Y="0.463" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00FFFFFF" Offset="0.549" />
                                        <GradientStop Color="#49000000" Offset="1" />
                                    </RadialGradientBrush>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Panel.ZIndex" Value="1" />
                            <Setter Property="Visibility" TargetName="border" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="border1" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="border2" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="border3" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="border4" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="BdSelected" Value="Visible" />
                            <Setter Property="Visibility" TargetName="borderSelected" Value="Visible" />
                            <Setter Property="Visibility" TargetName="SelectedBG" Value="Visible" />
                            <Setter Property="Visibility" TargetName="Selected" Value="Visible" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="false" />
                                <Condition Property="IsMouseOver" Value="true" />
                            </MultiTrigger.Conditions>
                        </MultiTrigger>
                        <Trigger Property="TabStripPlacement" Value="Bottom">
                            <Setter Property="BorderThickness" TargetName="BdSelected" Value="1,0,1,1" />
                            <Setter Property="CornerRadius" TargetName="border" Value="0,0,3,3" />
                            <Setter Property="CornerRadius" TargetName="border1" Value="0,0,3,3" />
                            <Setter Property="CornerRadius" TargetName="border2" Value="0,0,2,2" />
                            <Setter Property="CornerRadius" TargetName="border3" Value="0,0,2,2" />
                            <Setter Property="CornerRadius" TargetName="BdSelected" Value="0,0,3,3" />
                            <Setter Property="CornerRadius" TargetName="borderSelected" Value="0,0,3,3" />
                            <Setter Property="CornerRadius" TargetName="Disabled" Value="0,0,3,3" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Left">
                            <Setter Property="BorderThickness" TargetName="BdSelected" Value="1,1,0,1" />
                            <Setter Property="CornerRadius" TargetName="border" Value="3,0,0,3" />
                            <Setter Property="CornerRadius" TargetName="border1" Value="3,0,0,3" />
                            <Setter Property="CornerRadius" TargetName="border2" Value="2,0,0,2" />
                            <Setter Property="CornerRadius" TargetName="border3" Value="2,0,0,2" />
                            <Setter Property="CornerRadius" TargetName="BdSelected" Value="3,0,0,3" />
                            <Setter Property="CornerRadius" TargetName="borderSelected" Value="3,0,0,3" />
                            <Setter Property="CornerRadius" TargetName="Disabled" Value="3,0,0,3" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Right">
                            <Setter Property="BorderThickness" TargetName="BdSelected" Value="0,1,1,1" />
                            <Setter Property="CornerRadius" TargetName="border" Value="0,3,3,0" />
                            <Setter Property="CornerRadius" TargetName="border1" Value="0,3,3,0" />
                            <Setter Property="CornerRadius" TargetName="border2" Value="0,2,2,0" />
                            <Setter Property="CornerRadius" TargetName="border3" Value="0,2,2,0" />
                            <Setter Property="CornerRadius" TargetName="BdSelected" Value="0,3,3,0" />
                            <Setter Property="CornerRadius" TargetName="borderSelected" Value="0,3,3,0" />
                            <Setter Property="CornerRadius" TargetName="Disabled" Value="0,3,3,0" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true" />
                                <Condition Property="TabStripPlacement" Value="Top" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Visibility" TargetName="border" Value="Hidden" />
                            <Setter Property="Visibility" TargetName="border1" Value="Hidden" />
                            <Setter Property="Visibility" TargetName="border2" Value="Hidden" />
                            <Setter Property="Visibility" TargetName="border3" Value="Hidden" />
                            <Setter Property="Visibility" TargetName="border4" Value="Hidden" />
                            <Setter Property="Visibility" TargetName="BdSelected" Value="Visible" />
                            <Setter Property="Visibility" TargetName="borderSelected" Value="Visible" />
                            <Setter Property="Visibility" TargetName="SelectedBG" Value="Visible" />
                            <Setter Property="Visibility" TargetName="Selected" Value="Visible" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true" />
                                <Condition Property="TabStripPlacement" Value="Bottom" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Margin" Value="-2,-1,-2,-2" />
                            <Setter Property="Margin" TargetName="Content" Value="6,1,6,1" />
                            <Setter Property="Visibility" TargetName="BdSelected" Value="Visible" />
                            <Setter Property="Visibility" TargetName="borderSelected" Value="Visible" />
                            <Setter Property="Visibility" TargetName="border" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="border1" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="border2" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="border3" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="border4" Value="Collapsed" />
                            <Setter Property="CornerRadius" TargetName="BdSelected" Value="0,0,3,3" />
                            <Setter Property="CornerRadius" TargetName="borderSelected" Value="0,0,3,3" />
                            <Setter Property="BorderThickness" TargetName="BdSelected" Value="1,0,1,1" />
                            <Setter Property="BorderThickness" TargetName="borderSelected" Value="1,0,1,1" />
                            <Setter Property="Visibility" TargetName="Selected" Value="Visible" />
                            <Setter Property="Visibility" TargetName="SelectedBG" Value="Visible" />
                            <Setter Property="CornerRadius" TargetName="SelectedBG" Value="0,0,2,2" />
                            <Setter Property="Margin" TargetName="SelectedBG" Value="1,0,1,1" />
                            <Setter Property="BorderThickness" TargetName="SelectedBG" Value="1,0,1,1" />
                            <Setter Property="Margin" TargetName="Selected" Value="2,0,2,2" />
                            <Setter Property="Background" TargetName="Selected">
                                <Setter.Value>
                                    <LinearGradientBrush EndPoint="0.498,0.393" StartPoint="0.498,1.393">
                                        <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0" />
                                        <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="OpacityMask" TargetName="Selected">
                                <Setter.Value>
                                    <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
                                        <GradientStop Color="#4C000000" Offset="0" />
                                        <GradientStop Color="#00FFFFFF" Offset="1" />
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="CornerRadius" TargetName="Disabled" Value="0,0,3,3" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true" />
                                <Condition Property="TabStripPlacement" Value="Left" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Margin" Value="-2,-2,-1,-2" />
                            <Setter Property="Margin" TargetName="Content" Value="6,1,6,1" />
                            <Setter Property="Visibility" TargetName="border" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="border1" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="border2" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="border3" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="border4" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="BdSelected" Value="Visible" />
                            <Setter Property="Visibility" TargetName="borderSelected" Value="Visible" />
                            <Setter Property="CornerRadius" TargetName="BdSelected" Value="3,0,0,3" />
                            <Setter Property="BorderThickness" TargetName="BdSelected" Value="1,1,0,1" />
                            <Setter Property="CornerRadius" TargetName="borderSelected" Value="3,0,0,3" />
                            <Setter Property="BorderThickness" TargetName="borderSelected" Value="1,1,0,1" />
                            <Setter Property="Visibility" TargetName="SelectedBG" Value="Visible" />
                            <Setter Property="CornerRadius" TargetName="SelectedBG" Value="2,0,0,2" />
                            <Setter Property="BorderThickness" TargetName="SelectedBG" Value="1,1,0,1" />
                            <Setter Property="Margin" TargetName="SelectedBG" Value="1,1,0,1" />
                            <Setter Property="Margin" TargetName="Selected" Value="2,2,0,2" />
                            <Setter Property="Visibility" TargetName="Selected" Value="Visible" />
                            <Setter Property="OpacityMask" TargetName="Selected">
                                <Setter.Value>
                                    <LinearGradientBrush EndPoint="0.626,0.5" StartPoint="0.374,0.5">
                                        <GradientStop Color="#4C000000" Offset="0" />
                                        <GradientStop Color="#00FFFFFF" Offset="1" />
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="CornerRadius" TargetName="Disabled" Value="3,0,0,3" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true" />
                                <Condition Property="TabStripPlacement" Value="Right" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Margin" Value="-1,-2,-2,-2" />
                            <Setter Property="Margin" TargetName="Content" Value="6,1,6,1" />
                            <Setter Property="Visibility" TargetName="border" Value="Hidden" />
                            <Setter Property="Visibility" TargetName="border1" Value="Hidden" />
                            <Setter Property="Visibility" TargetName="border2" Value="Hidden" />
                            <Setter Property="Visibility" TargetName="border3" Value="Hidden" />
                            <Setter Property="Visibility" TargetName="border4" Value="Hidden" />
                            <Setter Property="Visibility" TargetName="BdSelected" Value="Visible" />
                            <Setter Property="Visibility" TargetName="borderSelected" Value="Visible" />
                            <Setter Property="CornerRadius" TargetName="BdSelected" Value="0,3,3,0" />
                            <Setter Property="BorderThickness" TargetName="BdSelected" Value="0,1,1,1" />
                            <Setter Property="BorderThickness" TargetName="borderSelected" Value="0,1,1,1" />
                            <Setter Property="CornerRadius" TargetName="borderSelected" Value="0,3,3,0" />
                            <Setter Property="Visibility" TargetName="SelectedBG" Value="Visible" />
                            <Setter Property="CornerRadius" TargetName="SelectedBG" Value="0,2,2,0" />
                            <Setter Property="Margin" TargetName="SelectedBG" Value="0,1,1,1" />
                            <Setter Property="BorderThickness" TargetName="SelectedBG" Value="0,1,1,1" />
                            <Setter Property="Margin" TargetName="Selected" Value="0,2,2,2" />
                            <Setter Property="Visibility" TargetName="Selected" Value="Visible" />
                            <Setter Property="OpacityMask" TargetName="Selected">
                                <Setter.Value>
                                    <LinearGradientBrush EndPoint="0.374,0.5" StartPoint="0.626,0.5">
                                        <GradientStop Color="#4C000000" Offset="0" />
                                        <GradientStop Color="#00FFFFFF" Offset="1" />
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="CornerRadius" TargetName="Disabled" Value="0,3,3,0" />
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Visibility" TargetName="Disabled" Value="Visible" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ComboBox -->
    <!--<Style TargetType="{x:Type ComboBox}">
        <Style.Resources>
            <Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
            <Style x:Key="ComboBoxReadonlyToggleButton" TargetType="{x:Type ToggleButton}">
                <Setter Property="OverridesDefaultStyle" Value="true" />
                <Setter Property="IsTabStop" Value="false" />
                <Setter Property="Focusable" Value="false" />
                <Setter Property="ClickMode" Value="Press" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ToggleButton}">
                            <Grid>
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Normal" />
                                        <VisualState x:Name="MouseOver">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
                                                    <SplineDoubleKeyFrame KeyTime="0" Value="0.101" />
                                                </DoubleAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                                </DoubleAnimationUsingKeyFrames>
                                                <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle1" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                    <SplineColorKeyFrame KeyTime="0" Value="#49000000" />
                                                </ColorAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Pressed">
                                            <Storyboard>
                                                <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle2" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                    <SplineColorKeyFrame KeyTime="0" Value="#FF000000" />
                                                </ColorAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
                                                    <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                                                </DoubleAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                                </DoubleAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <SplineDoubleKeyFrame KeyTime="0" Value="0.495" />
                                                </DoubleAnimationUsingKeyFrames>
                                                <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle3" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
                                                    <SplineColorKeyFrame KeyTime="0" Value="#7F000000" />
                                                </ColorAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                    <SplineDoubleKeyFrame KeyTime="0" Value="0.495" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="FocusedStates">
                                        <VisualState x:Name="Focused">
                                            <Storyboard>
                                                <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="rectangle3" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
                                                    <SplineColorKeyFrame KeyTime="0" Value="#7F000000" />
                                                </ColorAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Unfocused" />
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="0.514*" />
                                    <RowDefinition Height="0.486*" />
                                </Grid.RowDefinitions>
                                <Rectangle Stroke="#FFFFFFFF" Grid.RowSpan="2" RadiusX="4" RadiusY="4" StrokeThickness="1.2" x:Name="rectangle2">
                                    <Rectangle.Fill>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.147" ScaleY="1.723" />
                                                    <TranslateTransform X="0.002" Y="0.008" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#FFFFFFFF" Offset="0" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Rectangle Stroke="{TemplateBinding BorderBrush}" Grid.RowSpan="2" RadiusX="4" RadiusY="4" Opacity="0.65" StrokeThickness="1.2" x:Name="rectangle">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                            <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.697" />
                                            <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Rectangle Fill="{TemplateBinding Background}" Stroke="#7FFFFFFF" Grid.RowSpan="2" RadiusX="3.5" RadiusY="3.5" Margin="1,1,1,1" x:Name="rectangle3" />
                                <Rectangle Stroke="{x:Null}" Grid.RowSpan="2" RadiusX="3.5" RadiusY="3.5" StrokeThickness="0" Margin="2,2,2,2" x:Name="rectangle1">
                                    <Rectangle.OpacityMask>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <TranslateTransform X="0" Y="-0.496" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#00FFFFFF" Offset="0.286" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Rectangle.OpacityMask>
                                    <Rectangle.Fill>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.613" ScaleY="2.078" />
                                                    <TranslateTransform X="-0.011" Y="0.539" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#00FFFFFF" Offset="0.559" />
                                            <GradientStop Color="#33000000" Offset="1" />
                                        </RadialGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Border Grid.RowSpan="1" Opacity="0.8" CornerRadius="4,4,40,40" Margin="1,1,1,0" x:Name="border">
                                    <Border.Background>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1" ScaleY="1.898" />
                                                    <TranslateTransform X="0" Y="-0.449" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#BFFFFFFF" Offset="0" />
                                            <GradientStop Color="#4CFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Grid Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" HorizontalAlignment="Right" Grid.RowSpan="2">
                                    <Path Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" x:Name="Arrow" VerticalAlignment="Center" Data="{StaticResource DownArrowGeometry}" />
                                </Grid>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsChecked" Value="true">

                                </Trigger>
                                <Trigger Property="IsEnabled" Value="false">
                                    <Setter Property="Fill" TargetName="Arrow" Value="#AFAFAF" />
                                    <Setter Property="Opacity" TargetName="rectangle" Value="0.2"/>
                                    <Setter Property="Fill" TargetName="rectangle2">
                                        <Setter.Value>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.147" ScaleY="1.723"/>
                                                        <TranslateTransform X="0.002" Y="0.008"/>
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#FFECECEC" Offset="0"/>
                                                <GradientStop Color="#FFECECEC" Offset="1"/>
                                            </RadialGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="Background" Value="#00000000" />
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
            </Style>
            <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
                <Grid x:Name="Placement" SnapsToDevicePixels="true">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Popup x:Name="PART_Popup" AllowsTransparency="true" IsOpen="{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Grid.ColumnSpan="1" >
                        <Border MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding Path=ActualWidth, ElementName=Placement}" x:Name="Shdw">
                            <Border x:Name="DropDownBorder" Background="#FFFFFFFF" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="4,4,4,4">
                                <ScrollViewer>
                                    <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.DirectionalNavigation="Contained" />
                                </ScrollViewer>
                            </Border>
                        </Border>
                    </Popup>
                    <Border CornerRadius="4,4,4,4" x:Name="Border">
                        <Grid>
                            <ToggleButton Style="{DynamicResource ComboBoxReadonlyToggleButton}" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" />
                            <TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsReadOnly="{Binding Path=IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="2,2,21,2" Background="{x:Null}" />
                        </Grid>
                    </Border>
                </Grid>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsKeyboardFocusWithin" Value="true">
                        <Setter Property="Foreground" Value="Black" />
                    </Trigger>
                    <Trigger Property="IsDropDownOpen" Value="true" />
                    <Trigger Property="HasItems" Value="false">
                        <Setter Property="Height" TargetName="DropDownBorder" Value="95" />
                    </Trigger>
                    <Trigger Property="IsEnabled" Value="false">
                        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        <Setter Property="Background" Value="#FFF4F4F4" />
                    </Trigger>
                    <Trigger Property="IsGrouping" Value="true">
                        <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </Style.Resources>
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="Padding" Value="4,3" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBox}">
                    <Grid x:Name="MainGrid" SnapsToDevicePixels="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0" />
                        </Grid.ColumnDefinitions>
                        <Popup Margin="1" x:Name="PART_Popup" AllowsTransparency="true" IsOpen="{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Grid.ColumnSpan="2">

                            <Border x:Name="DropDownBorder" Background="#FFFFFFFF" BorderBrush="{DynamicResource PrimaryBrush}" BorderThickness="1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding Path=ActualWidth, ElementName=MainGrid}" CornerRadius="3,3,3,3">
                                <ScrollViewer CanContentScroll="true">
                                    <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.DirectionalNavigation="Contained" />
                                </ScrollViewer>
                            </Border>
                        </Popup>
                        <ToggleButton Style="{StaticResource ComboBoxReadonlyToggleButton}" Grid.ColumnSpan="2" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" IsHitTestVisible="false" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasItems" Value="false">
                            <Setter Property="Height" TargetName="DropDownBorder" Value="95" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                            <Setter Property="Background" Value="#FFF4F4F4" />
                        </Trigger>
                        <Trigger Property="IsGrouping" Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEditable" Value="true">
                <Setter Property="IsTabStop" Value="false" />
                <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
            </Trigger>
        </Style.Triggers>
    </Style>-->

    <!-- ComboBoxItem -->
    <Style TargetType="{x:Type ComboBoxItem}">
        <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="Padding" Value="3,0,3,0" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                    <Grid>
                        <Grid x:Name="SelectedHoverGrid" Opacity="0">
                            <Border CornerRadius="4" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1.2">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#FFFFFFFF" Offset="0" />
                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" CornerRadius="4" x:Name="Background" Opacity="0.65">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                        <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                        <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Background="{TemplateBinding Background}" BorderBrush="#7FFFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder" Margin="1" />
                            <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
                                <Border.OpacityMask>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <TranslateTransform X="0" Y="-0.5" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.OpacityMask>
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                <TranslateTransform Y="0.65" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00000000" Offset="0.55" />
                                        <GradientStop Color="#33000000" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Margin="1,1,1,10" CornerRadius="4,4,40,40" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                <TranslateTransform Y="-0.6" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#BFFFFFFF" Offset="0" />
                                        <GradientStop Color="#4CFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                        </Grid>
                        <Border x:Name="Bd" SnapsToDevicePixels="true" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" TargetName="SelectedHoverGrid" Value="0.55" />
                        </Trigger>
                        <Trigger Property="IsHighlighted" Value="true">
                            <Setter Property="Opacity" TargetName="SelectedHoverGrid" Value="0.75" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                            <Setter Property="Opacity" TargetName="Bd" Value="0.5" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Menu -->
    <Style TargetType="{x:Type Menu}">
        <Setter Property="Background" Value="#00000000" />
        <Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MenuFontFamilyKey}}" />
        <Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MenuFontSizeKey}}" />
        <Setter Property="FontStyle" Value="{DynamicResource {x:Static SystemFonts.MenuFontStyleKey}}" />
        <Setter Property="FontWeight" Value="{DynamicResource {x:Static SystemFonts.MenuFontWeightKey}}" />
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Menu}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="0.502*" />
                            <RowDefinition Height="0.498*" />
                        </Grid.RowDefinitions>
                        <Rectangle Stroke="#FFFFFFFF" Grid.RowSpan="2">
                            <Rectangle.Fill>
                                <RadialGradientBrush>
                                    <GradientStop Color="#FFFFFFFF" Offset="0" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle Stroke="{TemplateBinding BorderBrush}" Grid.RowSpan="2" Margin="1,1,1,1" Opacity="0.6">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1.244" StartPoint="0.5,0">
                                    <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.714" />
                                    <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle Fill="{TemplateBinding Background}" Grid.RowSpan="2" Margin="2,2,2,2" Stroke="#7FFFFFFF" />
                        <Rectangle Stroke="{x:Null}" Grid.RowSpan="2" Margin="2,2,2,2">
                            <Rectangle.OpacityMask>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <TranslateTransform X="0" Y="-0.499" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00FFFFFF" Offset="0.293" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Rectangle.OpacityMask>
                            <Rectangle.Fill>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="3.703" ScaleY="1.996" />
                                            <TranslateTransform X="-0.012" Y="0.498" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00FFFFFF" Offset="0.559" />
                                    <GradientStop Color="#33000000" Offset="1" />
                                </RadialGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Border CornerRadius="4,4,40,40" Opacity="0.5">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="2.023" ScaleY="1.945" />
                                            <TranslateTransform X="0.015" Y="-0.472" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#BFFFFFFF" Offset="0" />
                                    <GradientStop Color="#49FFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" Grid.RowSpan="2">
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- MenuItem -->
    <Style TargetType="{x:Type MenuItem}">
        <Style.Resources>
            <Geometry x:Key="Checkmark">M 0,5.1 L 1.7,5.2 L 3.4,7.1 L 8,0.4 L 9.2,0 L 3.3,10.8 Z</Geometry>
            <Style x:Key="MenuScrollButton" BasedOn="{x:Null}" TargetType="{x:Type RepeatButton}">
                <Setter Property="ClickMode" Value="Hover" />
                <Setter Property="MinWidth" Value="0" />
                <Setter Property="MinHeight" Value="0" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type RepeatButton}">
                            <DockPanel SnapsToDevicePixels="true" Background="Transparent">
                                <Rectangle Fill="Transparent" x:Name="R1" Width="1" DockPanel.Dock="Right" />
                                <Rectangle Fill="Transparent" x:Name="B1" Height="1" DockPanel.Dock="Bottom" />
                                <Rectangle Fill="Transparent" x:Name="L1" Width="1" DockPanel.Dock="Left" />
                                <Rectangle Fill="Transparent" x:Name="T1" Height="1" DockPanel.Dock="Top" />
                                <ContentPresenter HorizontalAlignment="Center" Margin="2,2,2,2" x:Name="ContentContainer" VerticalAlignment="Center" />
                            </DockPanel>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsPressed" Value="true">
                                    <Setter Property="Fill" TargetName="R1" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" />
                                    <Setter Property="Fill" TargetName="B1" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" />
                                    <Setter Property="Fill" TargetName="L1" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" />
                                    <Setter Property="Fill" TargetName="T1" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" />
                                    <Setter Property="Margin" TargetName="ContentContainer" Value="3,3,1,1" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Geometry x:Key="UpArrow">M 0,4 L 3.5,0 L 7,4 Z</Geometry>
            <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter" />
            <Geometry x:Key="DownArrow">M 0,0 L 3.5,4 L 7,0 Z</Geometry>
            <Geometry x:Key="RightArrow">M 0,0 L 4,3.5 L 0,7 Z</Geometry>
            <Style x:Key="{ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}" BasedOn="{x:Null}" TargetType="{x:Type ScrollViewer}">
                <Setter Property="HorizontalScrollBarVisibility" Value="Hidden" />
                <Setter Property="VerticalScrollBarVisibility" Value="Auto" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ScrollViewer}">
                            <Grid SnapsToDevicePixels="true">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Border Grid.Row="1">
                                    <ScrollContentPresenter Margin="{TemplateBinding Padding}" />
                                </Border>
                                <RepeatButton Style="{StaticResource MenuScrollButton}" Focusable="false" Command="{x:Static ScrollBar.LineUpCommand}" CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                                    <RepeatButton.Visibility>
                                        <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
                                            <Binding Path="ComputedVerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
                                            <Binding Path="VerticalOffset" RelativeSource="{RelativeSource TemplatedParent}" />
                                            <Binding Path="ExtentHeight" RelativeSource="{RelativeSource TemplatedParent}" />
                                            <Binding Path="ViewportHeight" RelativeSource="{RelativeSource TemplatedParent}" />
                                        </MultiBinding>
                                    </RepeatButton.Visibility>
                                    <Path Fill="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}" Data="{StaticResource UpArrow}" />
                                </RepeatButton>
                                <RepeatButton Style="{StaticResource MenuScrollButton}" Focusable="false" Grid.Row="2" Command="{x:Static ScrollBar.LineDownCommand}" CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                                    <RepeatButton.Visibility>
                                        <MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
                                            <Binding Path="ComputedVerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
                                            <Binding Path="VerticalOffset" RelativeSource="{RelativeSource TemplatedParent}" />
                                            <Binding Path="ExtentHeight" RelativeSource="{RelativeSource TemplatedParent}" />
                                            <Binding Path="ViewportHeight" RelativeSource="{RelativeSource TemplatedParent}" />
                                        </MultiBinding>
                                    </RepeatButton.Visibility>
                                    <Path Fill="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}" Data="{StaticResource DownArrow}" />
                                </RepeatButton>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <ControlTemplate x:Key="{ComponentResourceKey ResourceId=SubmenuContent, TypeInTargetAssembly={x:Type FrameworkElement}}" TargetType="{x:Type ContentControl}">
                <Border Background="#FFFFFFFF" BorderBrush="{DynamicResource PrimaryBrush}" BorderThickness="1" CornerRadius="4,4,4,4">
                    <Grid>
                        <ContentPresenter Margin="1,0" Grid.ColumnSpan="2" />
                    </Grid>
                </Border>
            </ControlTemplate>
            <ControlTemplate x:Key="{ComponentResourceKey ResourceId=SubmenuItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
                <Grid SnapsToDevicePixels="true">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <Rectangle RadiusX="4" RadiusY="4" Margin="1" x:Name="Hover" Grid.RowSpan="1" Opacity="0">
                        <Rectangle.Fill>
                            <RadialGradientBrush>
                                <RadialGradientBrush.RelativeTransform>
                                    <TransformGroup>
                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.148" ScaleY="2" />
                                        <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5" />
                                        <RotateTransform Angle="0" CenterX="0.5" CenterY="0.5" />
                                        <TranslateTransform X="-0.01" Y="-0.03" />
                                    </TransformGroup>
                                </RadialGradientBrush.RelativeTransform>
                                <GradientStop Color="#334392C7" Offset="0" />
                                <GradientStop Color="#33A0FCFF" Offset="1" />
                            </RadialGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>
                    <Rectangle Opacity="0" RadiusX="4" RadiusY="4" Margin="1,1,1,1" Grid.RowSpan="1" x:Name="Selected">
                        <Rectangle.Stroke>
                            <SolidColorBrush Color="#7F4392C7" />
                        </Rectangle.Stroke>
                        <Rectangle.Fill>
                            <LinearGradientBrush EndPoint="0.5,1.314" StartPoint="0.5,0">
                                <GradientStop Color="#594392C7" Offset="0" />
                                <GradientStop Color="#59A0FCFF" Offset="1" />
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>
                    <Grid x:Name="SelectedHoverGrid" Opacity="0">
                        <Border CornerRadius="4" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1.2">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#FFFFFFFF" Offset="0" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="4" x:Name="Background" Opacity="0.65">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                    <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                    <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Background="{TemplateBinding Background}" BorderBrush="#ccFFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder" Margin="2" />
                        <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
                            <Border.OpacityMask>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <TranslateTransform X="0" Y="-0.5" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.OpacityMask>
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                            <TranslateTransform Y="0.65" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00000000" Offset="0.55" />
                                    <GradientStop Color="#33000000" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Margin="1,1,1,10" CornerRadius="4,4,40,40" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                            <TranslateTransform Y="-0.6" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#BFFFFFFF" Offset="0" />
                                    <GradientStop Color="#4CFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                    </Grid>
                    <Grid Grid.RowSpan="1" Margin="4,0,4,0" VerticalAlignment="Center">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition SharedSizeGroup="MenuItemIconColumnGroup" MinWidth="24" Width="Auto" />
                            <ColumnDefinition Width="4" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="37" />
                            <ColumnDefinition SharedSizeGroup="MenuItemIGTColumnGroup" Width="Auto" />
                            <ColumnDefinition Width="17" />
                        </Grid.ColumnDefinitions>
                        <ContentPresenter Margin="1" x:Name="Icon" VerticalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Icon" />
                        <Border Margin="1" x:Name="GlyphPanel" Width="22" Height="22" Visibility="Hidden" Background="#E6EFF4" BorderBrush="#CDD3E6" BorderThickness="1" CornerRadius="3">
                            <Path Fill="{DynamicResource TextBrush}" FlowDirection="LeftToRight" x:Name="Glyph" Width="9" Height="11" Data="{StaticResource Checkmark}" />
                        </Border>
                        <ContentPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Grid.Column="2" ContentSource="Header" RecognizesAccessKey="True" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        <TextBlock Margin="{TemplateBinding Padding}" Grid.Column="4" Foreground="{DynamicResource TextBrush}" Text="{TemplateBinding InputGestureText}" />
                    </Grid>
                </Grid>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsPressed" Value="True">
                        <Setter Property="Background" TargetName="White">
                            <Setter.Value>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35"/>
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#FF000000" Offset="0"/>
                                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                </RadialGradientBrush>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="Background" TargetName="Background">
                            <Setter.Value>
                                <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                    <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0"/>
                                    <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1"/>
                                </LinearGradientBrush>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="Opacity" TargetName="Background" Value="0.6"/>
                        <Setter Property="Opacity" TargetName="Highlight" Value="0.5"/>
                    </Trigger>
                    <Trigger Property="Icon" Value="{x:Null}">
                        <Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
                    </Trigger>
                    <Trigger Property="IsChecked" Value="true">
                        <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible" />
                        <Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
                    </Trigger>
                    <Trigger Property="IsHighlighted" Value="true">
                        <Setter Property="Stroke" TargetName="Hover" Value="#40FFFFFF" />
                        <Setter Property="Opacity" TargetName="Selected" Value="1" />
                        <Setter Property="Opacity" TargetName="SelectedHoverGrid" Value="1"/>
                    </Trigger>
                    <Trigger Property="IsEnabled" Value="false">
                        <Setter Property="Foreground" Value="#FF9A9A9A" />
                        <Setter Property="Background" TargetName="GlyphPanel" Value="#EEE9E9" />
                        <Setter Property="BorderBrush" TargetName="GlyphPanel" Value="#DBD6D6" />
                        <Setter Property="Fill" TargetName="Glyph" Value="#848589" />
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
            <ControlTemplate x:Key="{ComponentResourceKey ResourceId=TopLevelHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
                <Grid SnapsToDevicePixels="true">
                    <Rectangle RadiusX="4" RadiusY="4" x:Name="OuterBorder" />
                    <Rectangle Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" RadiusX="4" RadiusY="4" Margin="1" x:Name="Bg" Opacity="0">
                        <Rectangle.Fill>
                            <LinearGradientBrush EndPoint="0.5,1.47" StartPoint="0.5,0">
                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.576" />
                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>
                    <Grid x:Name="SelectedHoverGrid" Opacity="0">
                        <Border  x:Name="White" BorderBrush="#FFFFFFFF" Background="white" Opacity="0.25" BorderThickness="1"/>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="1" x:Name="Background" Opacity="0.65">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                    <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                    <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Background="{TemplateBinding Background}" BorderBrush="#FFFFFF" BorderThickness="1" CornerRadius="1" x:Name="InnerBorder" Margin="2" />
                        <Border CornerRadius="2" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
                            <Border.OpacityMask>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <TranslateTransform X="0" Y="-0.5" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.OpacityMask>
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                            <TranslateTransform Y="0.65" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00000000" Offset="0.55" />
                                    <GradientStop Color="#33000000" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Margin="1,1,1,10" CornerRadius="4,4,40,10" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                            <TranslateTransform Y="-0.6" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#BFFFFFFF" Offset="0" />
                                    <GradientStop Color="#4CFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                    </Grid>
                    <DockPanel>
                        <ContentPresenter Margin="4,0,6,0" x:Name="Icon" VerticalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Icon" />
                        <Path Fill="{TemplateBinding Foreground}" FlowDirection="LeftToRight" Margin="7,0,0,0" x:Name="GlyphPanel" VerticalAlignment="Center" Visibility="Collapsed" Data="{StaticResource Checkmark}" />
                        <ContentPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Header" RecognizesAccessKey="True" />
                    </DockPanel>
                    <Popup x:Name="PART_Popup" AllowsTransparency="true" HorizontalOffset="1" IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" VerticalOffset="-1" Focusable="false">
                        <Border x:Name="Shdw" CornerRadius="4,4,4,4">
                            <ContentControl x:Name="SubMenuBorder" IsTabStop="false" Template="{DynamicResource {ComponentResourceKey ResourceId=SubmenuContent, TypeInTargetAssembly={x:Type FrameworkElement}}}">
                                <ScrollViewer Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}" CanContentScroll="true">
                                    <ItemsPresenter Margin="2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Grid.IsSharedSizeScope="true" KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle" />
                                </ScrollViewer>
                            </ContentControl>
                        </Border>
                    </Popup>
                </Grid>
                <ControlTemplate.Triggers>
                    <MultiTrigger>
                        <MultiTrigger.Conditions>
                            <Condition Property="IsChecked" Value="True"/>
                            <Condition Property="IsHighlighted" Value="True"/>
                        </MultiTrigger.Conditions>
                        <Setter Property="Opacity" TargetName="SelectedHoverGrid" Value="1"/>
                        <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
                        <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
                    </MultiTrigger>
                    <Trigger Property="IsSuspendingPopupAnimation" Value="true">
                        <Setter Property="PopupAnimation" TargetName="PART_Popup" Value="None" />
                    </Trigger>
                    <Trigger Property="Icon" Value="{x:Null}">
                        <Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
                    </Trigger>
                    <Trigger Property="IsChecked" Value="true">
                        <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible" />
                        <Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
                    </Trigger>
                    <Trigger Property="IsHighlighted" Value="true">
                        <Setter Property="Stroke" TargetName="Bg" Value="#90FFFFFF" />
                        <Setter Property="Stroke" TargetName="OuterBorder" Value="#50FFFFFF" />

                        <Setter Property="Opacity" TargetName="SelectedHoverGrid" Value="1"/>
                    </Trigger>
                    <Trigger Property="IsKeyboardFocused" Value="true">
                        <Setter Property="Stroke" TargetName="Bg" Value="#E0717070" />
                    </Trigger>
                    <Trigger Property="IsSubmenuOpen" Value="true">
                        <Setter Property="Opacity" TargetName="SelectedHoverGrid" Value="1"/>
                        <Setter Property="Background" TargetName="White">
                            <Setter.Value>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35"/>
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#FF242424" Offset="0"/>
                                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                </RadialGradientBrush>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="Background" TargetName="Background">
                            <Setter.Value>
                                <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                    <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0"/>
                                    <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1"/>
                                </LinearGradientBrush>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="Opacity" TargetName="Background" Value="0.6"/>
                        <Setter Property="Opacity" TargetName="Shadow" Value="0.5"/>
                        <Setter Property="Opacity" TargetName="Highlight" Value="0.5"/>
                    </Trigger>
                    <Trigger Property="IsEnabled" Value="false">
                        <Setter Property="Foreground" Value="#FF9A9A9A" />
                        <Setter Property="Fill" TargetName="GlyphPanel" Value="#848589" />
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
            <ControlTemplate x:Key="{ComponentResourceKey ResourceId=TopLevelItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
                <Grid SnapsToDevicePixels="true">
                    <Rectangle RadiusX="2" RadiusY="2" x:Name="OuterBorder" />
                    <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" RadiusX="1" RadiusY="1" Margin="1" x:Name="Bg" />
                    <Rectangle Margin="2" x:Name="InnerBorder" />
                    <Grid x:Name="SelectedHoverGrid" Opacity="0">
                        <Border CornerRadius="4" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#FFFFFFFF" Offset="0" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="4" x:Name="Background" Opacity="0.65">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                    <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                    <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Background="{TemplateBinding Background}" BorderBrush="#ccFFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder1" Margin="2" />
                        <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
                            <Border.OpacityMask>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <TranslateTransform X="0" Y="-0.5" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.OpacityMask>
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                            <TranslateTransform Y="0.65" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00000000" Offset="0.55" />
                                    <GradientStop Color="#33000000" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Margin="1,1,1,10" CornerRadius="4,4,40,10" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                            <TranslateTransform Y="-0.6" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#BFFFFFFF" Offset="0" />
                                    <GradientStop Color="#4CFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                    </Grid>
                    <DockPanel>
                        <ContentPresenter Margin="4,0,6,0" x:Name="Icon" VerticalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Icon" />
                        <Path Fill="{TemplateBinding Foreground}" FlowDirection="LeftToRight" Margin="7,0,0,0" x:Name="GlyphPanel" VerticalAlignment="Center" Visibility="Collapsed" Data="{StaticResource Checkmark}" />
                        <ContentPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Header" RecognizesAccessKey="True" />
                    </DockPanel>
                </Grid>
                <ControlTemplate.Triggers>
                    <Trigger Property="Icon" Value="{x:Null}">
                        <Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
                    </Trigger>
                    <Trigger Property="IsChecked" Value="true">
                        <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible" />
                        <Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
                    </Trigger>
                    <Trigger Property="IsHighlighted" Value="true">
                        <Setter Property="Stroke" TargetName="Bg" Value="#90717070" />
                        <Setter Property="Stroke" TargetName="OuterBorder" Value="#ccFFFFFF" />
                        <Setter Property="Stroke" TargetName="InnerBorder" Value="#ccFFFFFF" />
                        <Setter Property="Opacity" TargetName="SelectedHoverGrid" Value="1"/>
                    </Trigger>
                    <Trigger Property="IsKeyboardFocused" Value="true">
                        <Setter Property="Stroke" TargetName="InnerBorder" Value="#50747272" />
                        <Setter Property="Stroke" TargetName="Bg" Value="{DynamicResource PrimaryBrush}"/>
                    </Trigger>
                    <Trigger Property="IsEnabled" Value="false">
                        <Setter Property="Foreground" Value="#FF9A9A9A" />
                        <Setter Property="Fill" TargetName="GlyphPanel" Value="#848589" />
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
            <ControlTemplate x:Key="{ComponentResourceKey ResourceId=SubmenuHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
                <Grid SnapsToDevicePixels="true">
                    <Rectangle StrokeThickness="1" RadiusX="4" RadiusY="4" x:Name="Bg" Opacity="0" Margin="1,1,1,1" Stroke="#7F4392C7">
                        <Rectangle.Fill>
                            <LinearGradientBrush EndPoint="0.5,1.043" StartPoint="0.5,0">
                                <GradientStop Color="#594392C7" Offset="0" />
                                <GradientStop Color="#59A0FCFF" Offset="1" />
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>
                    <Rectangle StrokeThickness="1" RadiusX="4" RadiusY="4" Margin="1" x:Name="InnerBorder" Opacity="0">
                        <Rectangle.Fill>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#334392C7" Offset="0" />
                                <GradientStop Color="#33A0FCFF" Offset="1" />
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>
                    <Grid x:Name="SelectedHoverGrid" Opacity="0">
                        <Border CornerRadius="4" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#FFFFFFFF" Offset="0" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="4" x:Name="Background" Opacity="0.65">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                    <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                    <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Background="{TemplateBinding Background}" BorderBrush="#ccFFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder1" Margin="2" />
                        <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
                            <Border.OpacityMask>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <TranslateTransform X="0" Y="-0.5" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.OpacityMask>
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                            <TranslateTransform Y="0.65" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00000000" Offset="0.55" />
                                    <GradientStop Color="#33000000" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Margin="1,1,1,10" CornerRadius="4,4,40,40" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                            <TranslateTransform Y="-0.6" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#BFFFFFFF" Offset="0" />
                                    <GradientStop Color="#4CFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition SharedSizeGroup="MenuItemIconColumnGroup" MinWidth="24" Width="Auto" />
                            <ColumnDefinition Width="4" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="37" />
                            <ColumnDefinition SharedSizeGroup="MenuItemIGTColumnGroup" Width="Auto" />
                            <ColumnDefinition Width="17" />
                        </Grid.ColumnDefinitions>
                        <ContentPresenter Margin="1" x:Name="Icon" VerticalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Icon" />
                        <Border Margin="1" x:Name="GlyphPanel" Width="22" Height="22" Visibility="Hidden" Background="#E6EFF4" BorderBrush="#CDD3E6" BorderThickness="1" CornerRadius="3">
                            <Path Fill="#0C12A1" FlowDirection="LeftToRight" x:Name="Glyph" Width="9" Height="11" Data="{StaticResource Checkmark}" />
                        </Border>
                        <ContentPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Grid.Column="2" ContentSource="Header" RecognizesAccessKey="True" />
                        <TextBlock Margin="{TemplateBinding Padding}" Visibility="Collapsed" Grid.Column="4" Text="{TemplateBinding InputGestureText}" />
                        <Path Fill="{TemplateBinding Foreground}" Margin="4,0,0,0" VerticalAlignment="Center" Grid.Column="5" Data="{StaticResource RightArrow}" />
                    </Grid>
                    <Popup x:Name="PART_Popup" AllowsTransparency="true" HorizontalOffset="-2" IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" VerticalOffset="-3" Focusable="false">
                        <Border x:Name="Shdw" Background="{x:Null}" CornerRadius="4,4,4,4">
                            <ContentControl x:Name="SubMenuBorder" IsTabStop="false" Template="{DynamicResource {ComponentResourceKey ResourceId=SubmenuContent, TypeInTargetAssembly={x:Type FrameworkElement}}}">
                                <ScrollViewer Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}" CanContentScroll="true">
                                    <ItemsPresenter Margin="2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Grid.IsSharedSizeScope="true" KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle" />
                                </ScrollViewer>
                            </ContentControl>
                        </Border>
                    </Popup>
                </Grid>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsPressed" Value="True">
                        <Setter Property="Background" TargetName="White">
                            <Setter.Value>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35"/>
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#FF000000" Offset="0"/>
                                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                </RadialGradientBrush>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="Background" TargetName="Background">
                            <Setter.Value>
                                <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                    <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0"/>
                                    <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1"/>
                                </LinearGradientBrush>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="Opacity" TargetName="Background" Value="0.6"/>
                        <Setter Property="Opacity" TargetName="Highlight" Value="0.5"/>
                    </Trigger>
                    <Trigger Property="IsSuspendingPopupAnimation" Value="true">
                        <Setter Property="PopupAnimation" TargetName="PART_Popup" Value="None" />
                    </Trigger>
                    <Trigger Property="Icon" Value="{x:Null}">
                        <Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
                    </Trigger>
                    <Trigger Property="IsChecked" Value="true">
                        <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible" />
                        <Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
                    </Trigger>
                    <Trigger Property="IsHighlighted" Value="true">
                        <Setter Property="Opacity" TargetName="SelectedHoverGrid" Value="1"/>
                    </Trigger>
                    <Trigger Property="IsEnabled" Value="false">
                        <Setter Property="Foreground" Value="#FF9A9A9A" />
                        <Setter Property="Background" TargetName="GlyphPanel" Value="#EEE9E9" />
                        <Setter Property="BorderBrush" TargetName="GlyphPanel" Value="#DBD6D6" />
                        <Setter Property="Fill" TargetName="Glyph" Value="#848589" />
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </Style.Resources>
        <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=SubmenuItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}" />
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Style.Triggers>
            <Trigger Property="Role" Value="TopLevelHeader">
                <Setter Property="Padding" Value="7,2,8,3" />
                <Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=TopLevelHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}" />
            </Trigger>
            <Trigger Property="Role" Value="TopLevelItem">
                <Setter Property="Padding" Value="7,2,8,3" />
                <Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=TopLevelItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}" />
            </Trigger>
            <Trigger Property="Role" Value="SubmenuHeader">
                <Setter Property="Padding" Value="2,3,2,3" />
                <Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=SubmenuHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}" />
            </Trigger>
            <Trigger Property="Role" Value="SubmenuItem">
                <Setter Property="Padding" Value="2,3,2,3" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <!-- ToolBar -->
    <Style TargetType="{x:Type ToolBar}">
        <Style.Resources>
            <Style x:Key="ToolBarVerticalOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
                <Setter Property="MinHeight" Value="0" />
                <Setter Property="MinWidth" Value="0" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ToggleButton}">
                            <Border x:Name="Bd" SnapsToDevicePixels="true" CornerRadius="0,0,3,3">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0,1.407" StartPoint="0,0">
                                        <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.671" />
                                        <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                                <Canvas HorizontalAlignment="Right" Margin="2,7,2,2" VerticalAlignment="Bottom" Width="7" Height="6" SnapsToDevicePixels="true">
                                    <Path Stroke="White" Data="M 1.5 1 L 1.5 6" />
                                    <Path Stroke="{TemplateBinding Foreground}" Data="M 0.5 0 L 0.5 5" />
                                    <Path Fill="White" Data="M 3.5 0.5 L 7 3.5 L 4 6.5 Z" />
                                    <Path Fill="{TemplateBinding Foreground}" Data="M 3 -0.5 L 6 2.5 L 3 5.5 Z" />
                                </Canvas>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsMouseOver" Value="true">
                                    <Setter Property="Background" TargetName="Bd">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0,1.143" StartPoint="0,0">
                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.133" />
                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <Trigger Property="IsKeyboardFocused" Value="true">
                                    <Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource TextBrush}" />
                                    <Setter Property="BorderThickness" TargetName="Bd" Value="1,0,1,1" />
                                </Trigger>
                                <Trigger Property="IsEnabled" Value="false">
                                    <Setter Property="Opacity" TargetName="Bd" Value="0.2"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="ToolBarHorizontalOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
                <Setter Property="MinHeight" Value="0" />
                <Setter Property="MinWidth" Value="0" />
                <Setter Property="Background" Value="#00FFFFFF" />
                <Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ToggleButton}">
                            <Border x:Name="Bd" SnapsToDevicePixels="true" CornerRadius="0,3,3,0">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0,1.307" StartPoint="0,0">
                                        <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.74" />
                                        <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                                <Canvas HorizontalAlignment="Right" Margin="7,2,2,2" VerticalAlignment="Bottom" Width="6" Height="7" SnapsToDevicePixels="true">
                                    <Path Stroke="White" Data="M 1 1.5 L 6 1.5" />
                                    <Path Stroke="{TemplateBinding Foreground}" Data="M 0 0.5 L 5 0.5" />
                                    <Path Fill="White" Data="M 0.5 4 L 6.5 4 L 3.5 7 Z" />
                                    <Path Fill="{TemplateBinding Foreground}" Data="M -0.5 3 L 5.5 3 L 2.5 6 Z" />
                                </Canvas>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsMouseOver" Value="true">
                                    <Setter Property="Background" TargetName="Bd">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0,1.121" StartPoint="0,0">
                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.039" />
                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <Trigger Property="IsKeyboardFocused" Value="true">
                                    <Setter Property="Background" TargetName="Bd">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0,1.307" StartPoint="0,0">
                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0" />
                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="BorderThickness" TargetName="Bd" Value="0,1,1,1" />
                                    <Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource SecondaryBrush}" />
                                </Trigger>
                                <Trigger Property="IsEnabled" Value="false">
                                    <Setter Property="Opacity" TargetName="Bd" Value="0.2"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="ToolBarThumbStyle" TargetType="{x:Type Thumb}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Thumb}">
                            <Border SnapsToDevicePixels="True" Background="Transparent" Padding="{TemplateBinding Padding}">
                                <Rectangle>
                                    <Rectangle.Fill>
                                        <DrawingBrush TileMode="Tile" Viewbox="0,0,4,4" ViewboxUnits="Absolute" Viewport="0,0,4,4" ViewportUnits="Absolute">
                                            <DrawingBrush.Drawing>
                                                <DrawingGroup>
                                                    <GeometryDrawing Brush="#FFA0FCFF" Geometry="M1,1L1,3 3,3 3,1z" />
                                                    <GeometryDrawing Brush="#FF152937" Geometry="M0,0L0,2 2,2 2,0z" />
                                                </DrawingGroup>
                                            </DrawingBrush.Drawing>
                                        </DrawingBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsMouseOver" Value="true">
                                    <Setter Property="Cursor" Value="SizeAll" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="ToolBarButtonBaseStyle" TargetType="{x:Type Button}">
                <Setter Property="SnapsToDevicePixels" Value="true" />
                <Setter Property="OverridesDefaultStyle" Value="true" />
                <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ButtonBase}">
                            <Grid>
                                <Grid x:Name="SelectedHoverGrid" Opacity="0">
                                    <Border CornerRadius="4" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1.2">
                                        <Border.Background>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#FFFFFFFF" Offset="0" />
                                                <GradientStop Color="#FFFFFFFF" Offset="1" />
                                            </RadialGradientBrush>
                                        </Border.Background>
                                    </Border>
                                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" CornerRadius="4" x:Name="Background" Opacity="0.65">
                                        <Border.Background>
                                            <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                                <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                                <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                            </LinearGradientBrush>
                                        </Border.Background>
                                    </Border>
                                    <Border Background="{TemplateBinding Background}" BorderBrush="#7FFFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder" Margin="1" />
                                    <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
                                        <Border.OpacityMask>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <TranslateTransform X="0" Y="-0.5" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                                <GradientStop Color="#FFFFFFFF" Offset="1" />
                                            </RadialGradientBrush>
                                        </Border.OpacityMask>
                                        <Border.Background>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                        <TranslateTransform Y="0.65" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#00000000" Offset="0.55" />
                                                <GradientStop Color="#33000000" Offset="1" />
                                            </RadialGradientBrush>
                                        </Border.Background>
                                    </Border>
                                    <Border Margin="1,1,1,10" CornerRadius="4,4,40,40" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                                        <Border.Background>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                        <TranslateTransform Y="-0.6" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#BFFFFFFF" Offset="0" />
                                                <GradientStop Color="#4CFFFFFF" Offset="1" />
                                            </RadialGradientBrush>
                                        </Border.Background>
                                    </Border>
                                </Grid>
                                <Grid Margin="2,2,2,2" Visibility="Hidden" x:Name="grid" Opacity="0.35">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="0.161*" />
                                        <RowDefinition Height="0.839*" />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="0.039*" />
                                        <ColumnDefinition Width="0.961*" />
                                    </Grid.ColumnDefinitions>
                                    <Border Grid.ColumnSpan="2" Grid.RowSpan="1" Grid.Column="1" CornerRadius="0,3,0,0">
                                        <Border.Background>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#FF000000" Offset="0" />
                                                <GradientStop Color="#004392C7" Offset="1" />
                                            </LinearGradientBrush>
                                        </Border.Background>
                                    </Border>
                                    <Border Grid.ColumnSpan="1" Grid.RowSpan="2" Grid.Row="1" CornerRadius="0,0,0,3">
                                        <Border.Background>
                                            <LinearGradientBrush EndPoint="1.1,0.5" StartPoint="0,0.5">
                                                <GradientStop Color="#FF000000" />
                                                <GradientStop Color="#004392C7" Offset="1" />
                                            </LinearGradientBrush>
                                        </Border.Background>
                                    </Border>
                                    <Border Grid.ColumnSpan="1" Grid.RowSpan="1" CornerRadius="3,0,0,0">
                                        <Border.Background>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.988" ScaleY="1.988" />
                                                        <TranslateTransform X="0.494" Y="0.494" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#004392C7" />
                                                <GradientStop Color="#FF000000" Offset="1" />
                                            </RadialGradientBrush>
                                        </Border.Background>
                                    </Border>
                                </Grid>
                                <Border x:Name="Border" BorderThickness="1" Background="Transparent" BorderBrush="Transparent">
                                    <ContentPresenter Margin="10,5" HorizontalAlignment="Center" x:Name="contentPresenter"/>
                                </Border>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsKeyboardFocused" Value="true" />
                                <Trigger Property="IsMouseOver" Value="true">
                                    <Setter Property="Opacity" TargetName="SelectedHoverGrid" Value="1" />
                                </Trigger>
                                <Trigger Property="IsPressed" Value="true">
                                    <Setter Property="Opacity" TargetName="SelectedHoverGrid" Value="1" />
                                    <Setter Property="Background" TargetName="White">
                                        <Setter.Value>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#FF0E0E0E" Offset="0" />
                                                <GradientStop Color="#FFFFFFFF" Offset="1" />
                                            </RadialGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Background" TargetName="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                                <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0" />
                                                <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Opacity" TargetName="Background" Value="1" />
                                    <Setter Property="Opacity" TargetName="Highlight" Value="0.5" />
                                    <Setter Property="BorderBrush" TargetName="InnerBorder" Value="#7F242424" />
                                </Trigger>
                                <Trigger Property="CheckBox.IsChecked" Value="true">
                                    <Setter Property="Opacity" TargetName="SelectedHoverGrid" Value="1" />
                                    <Setter Property="Visibility" TargetName="grid" Value="Visible" />
                                </Trigger>
                                <Trigger Property="IsEnabled" Value="false" >
                                    <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="{x:Static ToolBar.ButtonStyleKey}" BasedOn="{StaticResource ToolBarButtonBaseStyle}" TargetType="{x:Type Button}" />
        </Style.Resources>
        <Setter Property="Background" Value="#00FFFFFF"/>
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToolBar}">
                    <Grid Margin="3,1,1,1" x:Name="Grid" SnapsToDevicePixels="true">
                        <Grid HorizontalAlignment="Right" x:Name="OverflowGrid">
                            <ToggleButton FocusVisualStyle="{x:Null}" x:Name="OverflowButton" Style="{StaticResource ToolBarHorizontalOverflowButtonStyle}" IsEnabled="{TemplateBinding HasOverflowItems}" IsChecked="{Binding Path=IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press" />
                            <Popup x:Name="OverflowPopup" AllowsTransparency="true" IsOpen="{Binding Path=IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" StaysOpen="false" Focusable="false">
                                <Border x:Name="Shdw" >
                                    <Border Background="#FFFFFFFF" BorderBrush="{DynamicResource PrimaryBrush}" BorderThickness="1" CornerRadius="4,4,4,4">
                                        <ToolBarOverflowPanel FocusVisualStyle="{x:Null}" Margin="2" x:Name="PART_ToolBarOverflowPanel" Focusable="true" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle" WrapWidth="200" />
                                    </Border>
                                </Border>
                            </Popup>
                        </Grid>
                        <Border Margin="0,0,11,0" x:Name="MainPanelBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3,3,3,3" Padding="{TemplateBinding Padding}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="0.485*" />
                                    <RowDefinition Height="0.515*" />
                                </Grid.RowDefinitions>
                                <Rectangle Stroke="#FFFFFFFF" RadiusX="3" RadiusY="3" Grid.RowSpan="2">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFFFFFFF" Offset="0" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Rectangle Stroke="{TemplateBinding BorderBrush}" RadiusX="3" RadiusY="3" Opacity="0.65" Grid.RowSpan="2">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1.379" StartPoint="0.5,0">
                                            <GradientStop Color="{DynamicResource PrimaryColor}" Offset="0.651" />
                                            <GradientStop Color="{DynamicResource SecondaryColor}" Offset="1" />
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Rectangle Fill="{TemplateBinding Background}" Stroke="#7FFFFFFF" RadiusX="3" RadiusY="3" Margin="1,1,1,1" Grid.RowSpan="2" />
                                <Rectangle Stroke="{x:Null}" StrokeThickness="0" RadiusX="2.5" RadiusY="2.5" Margin="2,2,2,2" Grid.RowSpan="2">
                                    <Rectangle.OpacityMask>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <TranslateTransform X="0" Y="-0.531" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#00FFFFFF" Offset="0.339" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Rectangle.OpacityMask>
                                    <Rectangle.Fill>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.405" ScaleY="1.952" />
                                                    <TranslateTransform X="0" Y="0.476" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#00FFFFFF" Offset="0.447" />
                                            <GradientStop Color="#33000000" Offset="1" />
                                        </RadialGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Border Margin="1,1,1,0" Opacity="0.8" Grid.RowSpan="1" CornerRadius="4,4,40,40">
                                    <Border.Background>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1" ScaleY="1.971" />
                                                    <TranslateTransform X="0" Y="-0.486" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#BFFFFFFF" Offset="0" />
                                            <GradientStop Color="#4CFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.Background>
                                </Border>
                                <DockPanel KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabNavigation="Local" Grid.RowSpan="2">
                                    <Thumb Margin="-3,-1,0,0" x:Name="ToolBarThumb" Style="{StaticResource ToolBarThumbStyle}" Width="10" Padding="6,5,1,6" />
                                    <ContentPresenter HorizontalAlignment="Center" Margin="4,0,4,0" x:Name="ToolBarHeader" VerticalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Header" />
                                    <ToolBarPanel Margin="0,1,2,2" x:Name="PART_ToolBarPanel" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" IsItemsHost="true" />
                                </DockPanel>
                            </Grid>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsOverflowOpen" Value="true">
                            <Setter Property="IsEnabled" TargetName="ToolBarThumb" Value="false" />
                        </Trigger>
                        <Trigger Property="Header" Value="{x:Null}">
                            <Setter Property="Visibility" TargetName="ToolBarHeader" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="ToolBarTray.IsLocked" Value="true">
                            <Setter Property="Visibility" TargetName="ToolBarThumb" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="HasDropShadow" SourceName="OverflowPopup" Value="true">
                            <Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5" />
                            <Setter Property="SnapsToDevicePixels" TargetName="Shdw" Value="true" />

                        </Trigger>
                        <Trigger Property="Orientation" Value="Vertical">
                            <Setter Property="Margin" TargetName="Grid" Value="1,3,1,1" />
                            <Setter Property="Style" TargetName="OverflowButton" Value="{StaticResource ToolBarVerticalOverflowButtonStyle}" />
                            <Setter Property="Height" TargetName="ToolBarThumb" Value="10" />
                            <Setter Property="Width" TargetName="ToolBarThumb" Value="Auto" />
                            <Setter Property="Margin" TargetName="ToolBarThumb" Value="-1,-3,0,0" />
                            <Setter Property="Padding" TargetName="ToolBarThumb" Value="5,6,6,1" />
                            <Setter Property="Margin" TargetName="ToolBarHeader" Value="0,0,0,4" />
                            <Setter Property="Margin" TargetName="PART_ToolBarPanel" Value="1,0,2,2" />
                            <Setter Property="DockPanel.Dock" TargetName="ToolBarThumb" Value="Top" />
                            <Setter Property="DockPanel.Dock" TargetName="ToolBarHeader" Value="Top" />
                            <Setter Property="HorizontalAlignment" TargetName="OverflowGrid" Value="Stretch" />
                            <Setter Property="VerticalAlignment" TargetName="OverflowGrid" Value="Bottom" />
                            <Setter Property="Placement" TargetName="OverflowPopup" Value="Right" />
                            <Setter Property="Margin" TargetName="MainPanelBorder" Value="0,0,0,11" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--ToolTip-->
    <Style TargetType="ToolTip">
        <Setter Property="Foreground" Value="{StaticResource TextBrush}" />
        <Setter Property="Background" Value="{StaticResource PrimaryBrush}" />
        <Setter Property="Padding" Value="5,3,5,3" />
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="{StaticResource PrimaryColor}" />
                    <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Content" Value="ToolTip" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToolTip">
                    <Grid x:Name="RootElement">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.096*" />
                            <ColumnDefinition Width="0.836*" />
                            <ColumnDefinition Width="0.068*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="0.257*" />
                            <RowDefinition Height="0.536*" />
                            <RowDefinition Height="0.207*" />
                        </Grid.RowDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Disabled" />
                                <VisualState x:Name="ReadOnly" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Background"  CornerRadius="4,4,4,4" Background="{StaticResource PrimaryBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,1" Grid.RowSpan="3" Grid.ColumnSpan="3" />

                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" TextBlock.Foreground="white" RenderTransformOrigin="0.5,0.5" Content="{TemplateBinding Content}" Grid.Row="1" Grid.Column="1" Margin="10,5" />

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ProgressBar -->
    <Style x:Key="{x:Type ProgressBar}" TargetType="{x:Type ProgressBar}">
        <Setter Property="Foreground" Value="{StaticResource TextBrush}" />
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFB4B4B4" />
                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Maximum" Value="100" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="BorderBrush" Value="{StaticResource PrimaryBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ProgressBar}">
                    <Grid x:Name="Root" SnapsToDevicePixels="True">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="0.5*" />
                            <RowDefinition Height="0.5*" />
                        </Grid.RowDefinitions>
                        <Border CornerRadius="4" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1" Grid.RowSpan="2">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#FFFFFFFF" Offset="0" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border x:Name="PART_Track" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="4,4,4,4" Grid.RowSpan="2" Opacity="0.65" />
                        <Grid x:Name="ProgressBarRootGrid" Grid.RowSpan="2">
                            <Rectangle x:Name="ProgressBarRootGradient" Canvas.ZIndex="1" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="4" RadiusY="4" Opacity="0.65">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.7,1.263" StartPoint="0.699999988079071,0">
                                        <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.312" />
                                        <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Grid x:Name="IndeterminateRoot" Visibility="Collapsed">
                                <Rectangle Margin="{TemplateBinding BorderThickness}" x:Name="IndeterminateSolidFill" Opacity="1" RenderTransformOrigin="0.5,0.5" Fill="{TemplateBinding Foreground}" Stroke="#FF448DCA" StrokeThickness="0" RadiusX="4" RadiusY="4" />
                                <Rectangle Margin="{TemplateBinding BorderThickness}" x:Name="IndeterminateGradientFill" Opacity="0.7" StrokeThickness="1" RadiusX="4" RadiusY="4">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush MappingMode="Absolute" SpreadMethod="Repeat" EndPoint="0,1" StartPoint="20,1">
                                            <LinearGradientBrush.Transform>
                                                <TransformGroup>
                                                    <TranslateTransform X="0" />
                                                    <SkewTransform AngleX="-30" />
                                                </TransformGroup>
                                            </LinearGradientBrush.Transform>
                                            <GradientStop Color="#FFFFFFFF" Offset="0" />
                                            <GradientStop Color="#00FFFFFF" Offset=".25" />
                                            <GradientStop Color="#FFFFFFFF" Offset="0.85" />
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                            <Grid Margin="1" x:Name="DeterminateRoot">
                                <Rectangle HorizontalAlignment="Left" Margin="2" x:Name="PART_Indicator" StrokeThickness="0.5" RadiusX="4" RadiusY="4" Fill="{StaticResource PrimaryBrush}" />
                            </Grid>
                        </Grid>
                        <Border BorderBrush="#ccFFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder" Margin="2" Grid.RowSpan="2" />
                        <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Opacity="0.2" Grid.RowSpan="2">
                            <Border.OpacityMask>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <TranslateTransform X="0" Y="-0.5" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.OpacityMask>
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                            <TranslateTransform Y="0.65" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#00000000" Offset="0.55" />
                                    <GradientStop Color="#4C000000" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                        <Border Margin="1" CornerRadius="4,4,4,10" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                            <Border.Background>
                                <RadialGradientBrush>
                                    <RadialGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                            <TranslateTransform Y="-0.6" />
                                        </TransformGroup>
                                    </RadialGradientBrush.RelativeTransform>
                                    <GradientStop Color="#BFFFFFFF" Offset="0" />
                                    <GradientStop Color="#4CFFFFFF" Offset="1" />
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsIndeterminate" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard RepeatBehavior="Forever">
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateGradientFill" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:.5" Value="20" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Setter Property="Visibility" Value="Visible" TargetName="IndeterminateRoot" />
                            <Setter Property="Visibility" Value="Collapsed" TargetName="DeterminateRoot" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- TreeView -->
    <Style x:Key="{x:Type TreeView}" TargetType="{x:Type TreeView}">
        <Setter Property="Background" Value="white" />
        <Setter Property="Foreground" Value="{StaticResource TextBrush}" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="Cursor" Value="Arrow" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1.65">
                    <GradientStop Color="{StaticResource PrimaryColor}" Offset=".25" />
                    <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TreeView}">
                    <Grid x:Name="Root">
                        <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                            <Border Margin="1" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
                                <ScrollViewer x:Name="ScrollViewer" Background="{x:Null}" BorderBrush="Transparent" BorderThickness="0" IsTabStop="False" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                                    <ItemsPresenter Margin="5" x:Name="TreeItems" />
                                </ScrollViewer>
                            </Border>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- TreeViewItem -->
    <Style x:Key="{x:Type TreeViewItem}" TargetType="{x:Type TreeViewItem}">
        <Setter Property="Padding" Value="3" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{StaticResource PrimaryBrush}" />
        <Setter Property="Cursor" Value="Arrow" />
        <Setter Property="IsTabStop" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TreeViewItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="MouseOver">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MouseOverGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.3"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="MouseOut">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MouseOverGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.3"/>
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="Selected">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="SelectedHoverGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="Unselected">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="SelectedHoverGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid Background="Transparent" x:Name="grid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="15" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <ToggleButton x:Name="Expander" IsTabStop="False" IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                            <ToggleButton.Template>
                                <ControlTemplate TargetType="ToggleButton">
                                    <Grid x:Name="Root" Background="Transparent">
                                        <VisualStateManager.VisualStateGroups>
                                            <VisualStateGroup x:Name="CommonStates">
                                                <VisualState x:Name="Normal" />
                                                <VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <ColorAnimation Duration="0" Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="(Path.Stroke).Color" To="#FF1BBBFA" />
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To=".7" />
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                            <VisualStateGroup x:Name="CheckStates">
                                                <VisualState x:Name="Unchecked" />
                                                <VisualState x:Name="Checked">
                                                    <Storyboard>
                                                        <DoubleAnimation Duration="0" Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="Opacity" To="0" />
                                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1" />
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                        <Grid HorizontalAlignment="Right" Margin="2 2 5 2">
                                            <Path x:Name="UncheckedVisual" Height="9" HorizontalAlignment="Right" VerticalAlignment="Center" Width="6" Data="M 0,0 L 0,9 L 5,4.5 Z" Fill="#FFFFFFFF" Stroke="#FF989898" StrokeLineJoin="Miter" StrokeThickness="1" />
                                            <Path x:Name="CheckedVisual" Height="6" HorizontalAlignment="Center" VerticalAlignment="Center" Width="6" Opacity="0" Data="M 6,0 L 6,6 L 0,6 Z" Fill="#FF262626" StrokeLineJoin="Miter" />
                                        </Grid>
                                    </Grid>
                                </ControlTemplate>
                            </ToggleButton.Template>
                        </ToggleButton>
                        <Rectangle x:Name="select" IsHitTestVisible="False" Opacity="0" Grid.Column="1" Fill="#FFBADDE9" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="2" RadiusY="2" />
                        <Rectangle x:Name="inactive" IsHitTestVisible="False" Opacity="0" Grid.Column="1" Fill="#FF999999" Stroke="#FF333333" StrokeThickness="1" RadiusX="2" RadiusY="2" />
                        <Grid x:Name="MouseOverGrid" Opacity="0" Grid.Column="1">
                            <Border CornerRadius="4" x:Name="HoverWhite" BorderBrush="#FFFFFFFF" BorderThickness="1">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#FFFFFFFF" Offset="0" />
                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="4" x:Name="HoverBackground" Opacity="0.65">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                        <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                        <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Background="{TemplateBinding Background}" BorderBrush="#FFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="HoverInnerBorder" Margin="2" />
                            <Border CornerRadius="3.5" x:Name="HoverShadow" Margin="2" Grid.RowSpan="2">
                                <Border.OpacityMask>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <TranslateTransform X="0" Y="-0.5" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.OpacityMask>
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                <TranslateTransform Y="0.65" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00000000" Offset="0.55" />
                                        <GradientStop Color="#33000000" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Margin="1,1,1,10" CornerRadius="4,4,40,10" x:Name="HoverHighlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                <TranslateTransform Y="-0.6" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#BFFFFFFF" Offset="0" />
                                        <GradientStop Color="#4CFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                        </Grid>
                        <Grid x:Name="SelectedHoverGrid" Opacity="0" Grid.Column="1" IsHitTestVisible="False">
                            <Border CornerRadius="4" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#FFFFFFFF" Offset="0" />
                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" CornerRadius="4" x:Name="Background" Opacity="0.65">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                        <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                        <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Background="{TemplateBinding Background}" BorderBrush="#FFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder" Margin="1" />
                            <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
                                <Border.OpacityMask>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <TranslateTransform X="0" Y="-0.5" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.OpacityMask>
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                <TranslateTransform Y="0.65" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00000000" Offset="0.55" />
                                        <GradientStop Color="#33000000" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Margin="1,1,1,10" CornerRadius="4,4,40,10" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                <TranslateTransform Y="-0.6" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#BFFFFFFF" Offset="0" />
                                        <GradientStop Color="#4CFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                        </Grid>
                        <Button x:Name="Header" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" IsTabStop="False" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Column="1" ClickMode="Hover" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}">
                            <Button.Template>
                                <ControlTemplate TargetType="Button">
                                    <Grid x:Name="Button_Normal" Background="Transparent">
                                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="15,4" RenderTransformOrigin="0.5,0.5" Grid.RowSpan="2" />
                                    </Grid>
                                    <ControlTemplate.Triggers>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>
                        <ItemsPresenter x:Name="ItemsHost" Visibility="Visible" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded" Value="false">
                            <Setter Property="Visibility" Value="Collapsed" TargetName="ItemsHost" />
                        </Trigger>
                        <Trigger Property="HasItems" Value="false">
                            <Setter Property="Visibility" Value="Hidden" TargetName="Expander" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource MouseOver}" x:Name="MouseOver_BeginStoryboard"/>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource MouseOut}" x:Name="MouseOut_BeginStoryboard"/>
                            </Trigger.ExitActions>
                            <Setter Property="Opacity" TargetName="MouseOverGrid" Value="0"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="true">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource Selected}" x:Name="Selected_BeginStoryboard"/>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource Unselected}" x:Name="Unselected_BeginStoryboard"/>
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" TargetName="grid" Value="0.65"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--TreeListViewItem-->
    <r:LevelToIndentConverter x:Key="LevelToIndentConverter"/>
    <Style TargetType="{x:Type r:TreeListViewItem}">
        <Setter Property="Control.HorizontalContentAlignment">
            <Setter.Value>
                <Binding Path="HorizontalContentAlignment" RelativeSource="{RelativeSource AncestorLevel=1, Mode=FindAncestor, AncestorType=ItemsControl}" />
            </Setter.Value>
        </Setter>
        <Setter Property="Control.VerticalContentAlignment">
            <Setter.Value>
                <Binding Path="VerticalContentAlignment" RelativeSource="{RelativeSource AncestorLevel=1, Mode=FindAncestor, AncestorType=ItemsControl}" />
            </Setter.Value>
        </Setter>
        <Setter Property="Control.Padding">
            <Setter.Value>
                <Thickness>1,0,0,0</Thickness>
            </Setter.Value>
        </Setter>
        <Setter Property="TextElement.Foreground">
            <Setter.Value>
                <DynamicResource ResourceKey="{x:Static SystemColors.ControlTextBrushKey}" />
            </Setter.Value>
        </Setter>
        <Setter Property="FrameworkElement.FocusVisualStyle">
            <Setter.Value>
                <Style TargetType="IFrameworkInputElement">
                    <Style.Resources>
                        <ResourceDictionary />
                    </Style.Resources>
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate TargetType="r:TreeListViewItem">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="MouseOver">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MouseOverGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.3"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="MouseOut">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MouseOverGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.3"/>
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="Selected">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="SelectedHoverGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="Unselected">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="SelectedHoverGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid Background="Transparent" x:Name="grid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Grid x:Name="SelectedHoverGrid" Opacity="0" IsHitTestVisible="False">
                            <Border CornerRadius="4" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#FFFFFFFF" Offset="0" />
                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" CornerRadius="4" x:Name="Background" Opacity="0.65">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                        <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                        <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Background="{TemplateBinding Background}" BorderBrush="#FFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder" Margin="1" />
                            <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
                                <Border.OpacityMask>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <TranslateTransform X="0" Y="-0.5" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.OpacityMask>
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                <TranslateTransform Y="0.65" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00000000" Offset="0.55" />
                                        <GradientStop Color="#33000000" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Margin="1,1,1,10" CornerRadius="4,4,40,10" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                <TranslateTransform Y="-0.6" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#BFFFFFFF" Offset="0" />
                                        <GradientStop Color="#4CFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                        </Grid>
                        <Grid x:Name="MouseOverGrid" Opacity="0" IsHitTestVisible="False">
                            <Border CornerRadius="4" x:Name="HoverWhite" BorderBrush="#FFFFFFFF" BorderThickness="1">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#FFFFFFFF" Offset="0" />
                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="4" x:Name="HoverBackground" Opacity="0.65">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                        <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                        <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Background="{TemplateBinding Background}" BorderBrush="#FFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="HoverInnerBorder" Margin="2" />
                            <Border CornerRadius="3.5" x:Name="HoverShadow" Margin="2" Grid.RowSpan="2">
                                <Border.OpacityMask>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <TranslateTransform X="0" Y="-0.5" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.OpacityMask>
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                <TranslateTransform Y="0.65" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#00000000" Offset="0.55" />
                                        <GradientStop Color="#33000000" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Margin="1,1,1,10" CornerRadius="4,4,40,10" x:Name="HoverHighlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                <TranslateTransform Y="-0.6" />
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#BFFFFFFF" Offset="0" />
                                        <GradientStop Color="#4CFFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>
                        </Grid>
                        <Border BorderBrush="{TemplateBinding Border.BorderBrush}" BorderThickness="{TemplateBinding Border.BorderThickness}" Name="Bd" Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True" Padding="{TemplateBinding Control.Padding}">
                            <r:TreeGridViewRowPresenter x:Name="PART_Header"
                FirstColumnIndent="{Binding Level,Converter={StaticResource LevelToIndentConverter},RelativeSource={RelativeSource AncestorType={x:Type r:TreeListViewItem}},ConverterParameter=19}"
                Content="{TemplateBinding Header}" 
                Columns="{Binding Path=Columns,RelativeSource={RelativeSource AncestorType={x:Type r:TreeListView}}}">
                                <r:TreeGridViewRowPresenter.Expander>
                                    <Grid>
                                        <ToggleButton Width="19" Height="16" ClickMode="Press" Name="Expander"
                                                  IsChecked="{Binding Path=IsExpanded,RelativeSource={RelativeSource AncestorType={x:Type r:TreeListViewItem}}}">
                                            <ToggleButton.Style>
                                                <Style TargetType="ToggleButton">
                                                    <Style.Resources>
                                                        <ResourceDictionary />
                                                    </Style.Resources>
                                                    <Setter Property="UIElement.Focusable">
                                                        <Setter.Value>
                                                            <s:Boolean>False</s:Boolean>
                                                        </Setter.Value>
                                                    </Setter>
                                                    <Setter Property="FrameworkElement.Width">
                                                        <Setter.Value>
                                                            <s:Double>19</s:Double>
                                                        </Setter.Value>
                                                    </Setter>
                                                    <Setter Property="FrameworkElement.Height">
                                                        <Setter.Value>
                                                            <s:Double>13</s:Double>
                                                        </Setter.Value>
                                                    </Setter>
                                                    <Setter Property="Control.Template">
                                                        <Setter.Value>
                                                            <ControlTemplate TargetType="ToggleButton">
                                                                <Border Height="13" Width="19" Background="#00FFFFFF">
                                                                    <Border Height="9" BorderBrush="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" Width="9" BorderThickness="1,1,1,1" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" SnapsToDevicePixels="True">
                                                                        <Path Margin="1,1,1,1" Data="M0,2L0,3 2,3 2,5 3,5 3,3 5,3 5,2 3,2 3,0 2,0 2,2z" Fill="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" Name="ExpandPath" />
                                                                    </Border>
                                                                </Border>
                                                                <ControlTemplate.Triggers>
                                                                    <Trigger Property="ToggleButton.IsChecked">
                                                                        <Setter Property="Path.Data" TargetName="ExpandPath">
                                                                            <Setter.Value>
                                                                                <StreamGeometry>M0,2L0,3 5,3 5,2z</StreamGeometry>
                                                                            </Setter.Value>
                                                                        </Setter>
                                                                        <Trigger.Value>
                                                                            <s:Boolean>True</s:Boolean>
                                                                        </Trigger.Value>
                                                                    </Trigger>
                                                                </ControlTemplate.Triggers>
                                                            </ControlTemplate>
                                                        </Setter.Value>
                                                    </Setter>
                                                </Style>
                                            </ToggleButton.Style>
                                        </ToggleButton>
                                    </Grid>
                                </r:TreeGridViewRowPresenter.Expander>
                            </r:TreeGridViewRowPresenter>
                        </Border>

                        <ItemsPresenter x:Name="ItemsHost" Visibility="Visible"  Grid.Row="1" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TreeViewItem.IsExpanded">
                            <Setter Property="UIElement.Visibility" TargetName="ItemsHost" Value="{x:Static Visibility.Collapsed}" />
                            <Trigger.Value>
                                <s:Boolean>False</s:Boolean>
                            </Trigger.Value>
                        </Trigger>
                        <Trigger Property="ItemsControl.HasItems">
                            <Setter Property="UIElement.Visibility" TargetName="Expander" Value="{x:Static Visibility.Hidden}" />
                            <Trigger.Value>
                                <s:Boolean>False</s:Boolean>
                            </Trigger.Value>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource MouseOver}" x:Name="MouseOver_BeginStoryboard"/>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource MouseOut}" x:Name="MouseOut_BeginStoryboard"/>
                            </Trigger.ExitActions>
                            <Setter Property="Opacity" TargetName="MouseOverGrid" Value="0"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="true">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource Selected}" x:Name="Selected_BeginStoryboard"/>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource Unselected}" x:Name="Unselected_BeginStoryboard"/>
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" TargetName="grid" Value="0.65"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="TreeViewItem.IsSelected">
                                    <Condition.Value>
                                        <s:Boolean>True</s:Boolean>
                                    </Condition.Value>
                                </Condition>
                                <Condition Property="TreeViewItem.IsSelectionActive">
                                    <Condition.Value>
                                        <s:Boolean>False</s:Boolean>
                                    </Condition.Value>
                                </Condition>
                            </MultiTrigger.Conditions>
                            <Setter Property="Panel.Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
                            <Setter Property="TextElement.Foreground">
                                <Setter.Value>
                                    <DynamicResource ResourceKey="{x:Static SystemColors.ControlTextBrushKey}" />
                                </Setter.Value>
                            </Setter>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <!--DataGridRow-->
    <Style x:Key="{x:Type DataGridRow}" TargetType="{x:Type DataGridRow}">
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="Validation.ErrorTemplate" Value="{x:Null}" />
        <Setter Property="ValidationErrorTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <TextBlock Margin="2,0,0,0" VerticalAlignment="Center" Foreground="Red" Text="!" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridRow}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="MouseOver">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MouseOverGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.2"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="MouseOut">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MouseOverGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.2"/>
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="Selected">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="SelectedHoverGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="Unselected">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="SelectedHoverGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Border x:Name="basicR_Border" 
                  Background="{TemplateBinding Background}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  SnapsToDevicePixels="True">
                        <SelectiveScrollingGrid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>

                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Grid x:Name="SelectedHoverGrid" Grid.Column="1" Opacity="0" IsHitTestVisible="False">
                                <Border CornerRadius="4" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1">
                                    <Border.Background>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#FFFFFFFF" Offset="0" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" CornerRadius="4" x:Name="Background" Opacity="0.65">
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                            <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                            <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
                                    <Border.OpacityMask>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <TranslateTransform X="0" Y="-0.5" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.OpacityMask>
                                    <Border.Background>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                    <TranslateTransform Y="0.65" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#00000000" Offset="0.55" />
                                            <GradientStop Color="#33000000" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border Margin="1,1,1,10" CornerRadius="4,4,40,10" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                                    <Border.Background>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                    <TranslateTransform Y="-0.6" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#BFFFFFFF" Offset="0" />
                                            <GradientStop Color="#4CFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.Background>
                                </Border>
                            </Grid>
                            <Grid x:Name="MouseOverGrid" Grid.Column="1" Opacity="0" IsHitTestVisible="False">
                                <Border CornerRadius="4" x:Name="HoverWhite" BorderBrush="#FFFFFFFF" BorderThickness="1">
                                    <Border.Background>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#FFFFFFFF" Offset="0" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="4" x:Name="HoverBackground" Opacity="0.65">
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
                                            <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
                                            <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border CornerRadius="3.5" x:Name="HoverShadow" Margin="2" Grid.RowSpan="2">
                                    <Border.OpacityMask>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <TranslateTransform X="0" Y="-0.5" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#00FFFFFF" Offset="0.3" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.OpacityMask>
                                    <Border.Background>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
                                                    <TranslateTransform Y="0.65" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#00000000" Offset="0.55" />
                                            <GradientStop Color="#33000000" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border Margin="1,1,1,10" CornerRadius="4,4,40,10" x:Name="HoverHighlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
                                    <Border.Background>
                                        <RadialGradientBrush>
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
                                                    <TranslateTransform Y="-0.6" />
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop Color="#BFFFFFFF" Offset="0" />
                                            <GradientStop Color="#4CFFFFFF" Offset="1" />
                                        </RadialGradientBrush>
                                    </Border.Background>
                                </Border>
                            </Grid>
                            <DataGridCellsPresenter Grid.Column="1"
                                         ItemsPanel="{TemplateBinding ItemsPanel}"
                                         SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>

                            <DataGridDetailsPresenter  SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}, Path=AreRowDetailsFrozen, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}}"
                                            Grid.Column="1" Grid.Row="1"
                                            Visibility="{TemplateBinding DetailsVisibility}" />

                            <DataGridRowHeader SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"  Grid.RowSpan="2"
                                    Visibility="{Binding RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}, Path=HeadersVisibility, Converter={x:Static DataGrid.HeadersVisibilityConverter}, ConverterParameter={x:Static DataGridHeadersVisibility.Row}}"/>


                        </SelectiveScrollingGrid>
                    </Border>
                    <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource MouseOver}" x:Name="MouseOver_BeginStoryboard"/>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource MouseOut}" x:Name="MouseOut_BeginStoryboard"/>
                            </Trigger.ExitActions>
                            <Setter Property="Opacity" TargetName="MouseOverGrid" Value="0"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="true">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource Selected}" x:Name="Selected_BeginStoryboard"/>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource Unselected}" x:Name="Unselected_BeginStoryboard"/>
                            </Trigger.ExitActions>
                        </Trigger>

                      </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- styled to remove the standard blue selection colour and increase the padding -->
    <Style x:Key="{x:Type DataGridCell}" TargetType="{x:Type DataGridCell}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridCell}"> 
                    <Border Background="{TemplateBinding Background}" 
                              BorderBrush="{TemplateBinding BorderBrush}"  
                              BorderThickness="{TemplateBinding BorderThickness}" 
                              SnapsToDevicePixels="True">
                        <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="Foreground" Value="#FF000000" />
            </Trigger>

            <Trigger Property="IsKeyboardFocusWithin" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}" />
            </Trigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>